{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "import cv2\n",
    "from SegTracker import SegTracker\n",
    "from model_args import aot_args,sam_args,segtracker_args\n",
    "from PIL import Image\n",
    "from aot_tracker import _palette\n",
    "import numpy as np\n",
    "import torch\n",
    "import imageio\n",
    "import matplotlib.pyplot as plt\n",
    "from scipy.ndimage import binary_dilation\n",
    "import gc\n",
    "\n",
    "\n",
    "\n",
    "def save_prediction(pred_mask,output_dir,file_name):\n",
    "    save_mask = Image.fromarray(pred_mask.astype(np.uint8))\n",
    "    save_mask = save_mask.convert(mode='P')\n",
    "    save_mask.putpalette(_palette)\n",
    "    save_mask.save(os.path.join(output_dir,file_name))\n",
    "def colorize_mask(pred_mask):\n",
    "    save_mask = Image.fromarray(pred_mask.astype(np.uint8))\n",
    "    save_mask = save_mask.convert(mode='P')\n",
    "    save_mask.putpalette(_palette)\n",
    "    save_mask = save_mask.convert(mode='RGB')\n",
    "    return np.array(save_mask)\n",
    "def draw_mask(img, mask, alpha=0.7, id_countour=False):\n",
    "    img_mask = np.zeros_like(img)\n",
    "    img_mask = img\n",
    "    if id_countour:\n",
    "        # very slow ~ 1s per image\n",
    "        obj_ids = np.unique(mask)\n",
    "        obj_ids = obj_ids[obj_ids!=0]\n",
    "\n",
    "        for id in obj_ids:\n",
    "            # Overlay color on  binary mask\n",
    "            if id <= 255:\n",
    "                color = _palette[id*3:id*3+3]\n",
    "            else:\n",
    "                color = [0,0,0]\n",
    "            foreground = img * (1-alpha) + np.ones_like(img) * alpha * np.array(color)\n",
    "            binary_mask = (mask == id)\n",
    "\n",
    "            # Compose image\n",
    "            img_mask[binary_mask] = foreground[binary_mask]\n",
    "\n",
    "            countours = binary_dilation(binary_mask,iterations=1) ^ binary_mask\n",
    "            img_mask[countours, :] = 0\n",
    "    else:\n",
    "        binary_mask = (mask!=0)\n",
    "        countours = binary_dilation(binary_mask,iterations=1) ^ binary_mask\n",
    "        foreground = img*(1-alpha)+colorize_mask(mask)*alpha\n",
    "        img_mask[binary_mask] = foreground[binary_mask]\n",
    "        img_mask[countours,:] = 0\n",
    "        \n",
    "    return img_mask.astype(img.dtype)\n",
    "\n",
    "def create_directories(path):    \n",
    "    dir_path = os.path.dirname(path)\n",
    "    if not os.path.exists(dir_path):\n",
    "        os.makedirs(dir_path)\n",
    "        print(f\"Directory created: {dir_path}\")\n",
    "    else:\n",
    "        print(f\"Directory already exists: {dir_path}\")\n",
    "\n",
    "    return path\n",
    "\n",
    "def video_detection(io_args, segtracker_args, sam_args, aot_args, grounding_caption, box_threshold, text_threshold, box_size_threshold, reset_image):\n",
    "    # source video to segment\n",
    "    import shutil\n",
    "    shutil.copy(io_args['input_video'], io_args['original_video'])\n",
    "    \n",
    "    cap = cv2.VideoCapture(io_args['input_video'])\n",
    "    fps = cap.get(cv2.CAP_PROP_FPS)\n",
    "    # output masks\n",
    "    output_dir = io_args['output_mask_dir']\n",
    "    if not os.path.exists(output_dir):\n",
    "        os.makedirs(output_dir)\n",
    "    pred_list = []\n",
    "    masked_pred_list = []\n",
    "    det_count_one = []\n",
    "    det_count_frames = []\n",
    "    \n",
    "    torch.cuda.empty_cache()\n",
    "    gc.collect()\n",
    "    sam_gap = segtracker_args['sam_gap']\n",
    "    frame_idx = 0\n",
    "    segtracker = SegTracker(segtracker_args, sam_args, aot_args)\n",
    "    segtracker.restart_tracker()\n",
    "    \n",
    "    with torch.cuda.amp.autocast():\n",
    "        while cap.isOpened():\n",
    "            ret, frame = cap.read()\n",
    "            if not ret:\n",
    "                break\n",
    "            frame = cv2.cvtColor(frame,cv2.COLOR_BGR2RGB)\n",
    "            if frame_idx == 0:\n",
    "                pred_mask, _ = segtracker.detect_and_seg(frame, grounding_caption, box_threshold, text_threshold, box_size_threshold, reset_image)\n",
    "                torch.cuda.empty_cache()\n",
    "                gc.collect()\n",
    "                segtracker.add_reference(frame, pred_mask)\n",
    "            elif (frame_idx % sam_gap) == 0:\n",
    "                seg_mask, _ = segtracker.detect_and_seg(frame, grounding_caption, box_threshold, text_threshold, box_size_threshold, reset_image)\n",
    "                save_prediction(seg_mask, './debug/seg_result', str(frame_idx)+'.png')\n",
    "                torch.cuda.empty_cache()\n",
    "                gc.collect()\n",
    "                track_mask = segtracker.track(frame)\n",
    "                save_prediction(track_mask, './debug/aot_result', str(frame_idx)+'.png')\n",
    "                new_obj_mask = segtracker.find_new_objs(track_mask, seg_mask)\n",
    "                if np.sum(new_obj_mask > 0) >  frame.shape[0] * frame.shape[1] * 0.4:\n",
    "                    new_obj_mask = np.zeros_like(new_obj_mask)\n",
    "                save_prediction(new_obj_mask,output_dir,str(frame_idx)+'_new.png')\n",
    "                pred_mask = track_mask + new_obj_mask\n",
    "                segtracker.add_reference(frame, pred_mask)\n",
    "            else:\n",
    "                pred_mask = segtracker.track(frame,update_memory=True)\n",
    "            torch.cuda.empty_cache()\n",
    "            gc.collect()\n",
    "            \n",
    "            save_prediction(pred_mask,output_dir,str(frame_idx)+'.png')\n",
    "            pred_list.append(pred_mask)\n",
    "\n",
    "            obj_ids = np.unique(pred_mask)\n",
    "            obj_ids = obj_ids[obj_ids!=0]\n",
    "            det_count_frames.append(len(obj_ids))\n",
    "\n",
    "            print(\"processed frame {}, obj_num {}\".format(frame_idx,segtracker.get_obj_num()),end='\\r')\n",
    "               \n",
    "            frame_idx += 1\n",
    "        det_count_one = np.sum(det_count_frames)/frame_idx\n",
    "        cap.release()\n",
    "        \n",
    "        # draw pred mask on frame and save as a video\n",
    "        cap = cv2.VideoCapture(io_args['input_video'])\n",
    "        fps = cap.get(cv2.CAP_PROP_FPS)\n",
    "        width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))\n",
    "        height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))\n",
    "        num_frames = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))\n",
    "        \n",
    "        if io_args['input_video'][-3:]=='mp4':\n",
    "            fourcc =  cv2.VideoWriter_fourcc(*\"mp4v\")\n",
    "        elif io_args['input_video'][-3:] == 'avi':\n",
    "            fourcc =  cv2.VideoWriter_fourcc(*\"MJPG\")\n",
    "            # fourcc = cv2.VideoWriter_fourcc(*\"XVID\")\n",
    "        else:\n",
    "            fourcc = int(cap.get(cv2.CAP_PROP_FOURCC))\n",
    "        out = cv2.VideoWriter(io_args['output_video'], fourcc, fps, (width, height))\n",
    "        frame_idx = 0\n",
    "        while cap.isOpened():\n",
    "            ret, frame = cap.read()\n",
    "            if not ret:\n",
    "                break\n",
    "            frame = cv2.cvtColor(frame,cv2.COLOR_BGR2RGB)\n",
    "            pred_mask = pred_list[frame_idx]\n",
    "            masked_frame = draw_mask(frame,pred_mask)\n",
    "            # masked_frame = masked_pred_list[frame_idx]\n",
    "            masked_frame = cv2.cvtColor(masked_frame,cv2.COLOR_RGB2BGR)\n",
    "            out.write(masked_frame)\n",
    "            print('frame {} writed'.format(frame_idx),end='\\r')\n",
    "            frame_idx += 1\n",
    "        out.release()\n",
    "        cap.release()\n",
    "        print(\"\\n{} saved\".format(io_args['output_video']))\n",
    "        # save colorized masks as a gif\n",
    "        duration = 1000 / fps\n",
    "        imageio.mimsave(io_args['output_gif'],pred_list,duration=duration)\n",
    "        print(\"{} saved\".format(io_args['output_gif']))\n",
    "        print('\\nfinished')\n",
    "        \n",
    "    return pred_list, det_count_one\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "# print(video_paths[1])\n",
    "# print(prompt_paths[1])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Conduct evaluation using COCO classes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "Finishing last run (ID:nzxqdncs) before initializing another..."
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "Waiting for W&B process to finish... <strong style=\"color:green\">(success).</strong>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<style>\n",
       "    table.wandb td:nth-child(1) { padding: 0 10px; text-align: left ; width: auto;} td:nth-child(2) {text-align: left ; width: 100%}\n",
       "    .wandb-row { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; width: 100% }\n",
       "    .wandb-col { display: flex; flex-direction: column; flex-basis: 100%; flex: 1; padding: 10px; }\n",
       "    </style>\n",
       "<div class=\"wandb-row\"><div class=\"wandb-col\"><h3>Run history:</h3><br/><table class=\"wandb\"><tr><td>Total video num</td><td>▁</td></tr></table><br/></div><div class=\"wandb-col\"><h3>Run summary:</h3><br/><table class=\"wandb\"><tr><td>Total video num</td><td>691265</td></tr></table><br/></div></div>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       " View run <strong style=\"color:#cdcd00\">wise-water-1</strong> at: <a href='https://wandb.ai/bruceliu/Vid%20Model%20Eval/runs/nzxqdncs' target=\"_blank\">https://wandb.ai/bruceliu/Vid%20Model%20Eval/runs/nzxqdncs</a><br/> View job at <a href='https://wandb.ai/bruceliu/Vid%20Model%20Eval/jobs/QXJ0aWZhY3RDb2xsZWN0aW9uOjkyMzQ3NzE0/version_details/v0' target=\"_blank\">https://wandb.ai/bruceliu/Vid%20Model%20Eval/jobs/QXJ0aWZhY3RDb2xsZWN0aW9uOjkyMzQ3NzE0/version_details/v0</a><br/>Synced 7 W&B file(s), 0 media file(s), 6 artifact file(s) and 1 other file(s)"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "Find logs at: <code>./wandb/run-20230823_222056-nzxqdncs/logs</code>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "Successfully finished last run (ID:nzxqdncs). Initializing new run:<br/>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "88309f9f3c8f4edaaadfd043a5eee1d2",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "VBox(children=(Label(value='Waiting for wandb.init()...\\r'), FloatProgress(value=0.016668921033851803, max=1.0…"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "Tracking run with wandb version 0.15.8"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "Run data is saved locally in <code>/apdcephfs_cq3/share_1290939/raphaelliu/Segment-and-Track-Anything/wandb/run-20230823_222352-unxmp4fx</code>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "Syncing run <strong><a href='https://wandb.ai/bruceliu/Vid%20Model%20Eval/runs/unxmp4fx' target=\"_blank\">20230823-222352_pikavideos</a></strong> to <a href='https://wandb.ai/bruceliu/Vid%20Model%20Eval' target=\"_blank\">Weights & Biases</a> (<a href='https://wandb.me/run' target=\"_blank\">docs</a>)<br/>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       " View project at <a href='https://wandb.ai/bruceliu/Vid%20Model%20Eval' target=\"_blank\">https://wandb.ai/bruceliu/Vid%20Model%20Eval</a>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       " View run at <a href='https://wandb.ai/bruceliu/Vid%20Model%20Eval/runs/unxmp4fx' target=\"_blank\">https://wandb.ai/bruceliu/Vid%20Model%20Eval/runs/unxmp4fx</a>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:25:09 Total video num 691265\n",
      "2023-08-23 22:25:09 Total video num 691265\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Directory created: ./pikavideos/20230823-222352/cup/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/root/miniconda3/envs/STA/lib/python3.9/site-packages/transformers/modeling_utils.py:881: FutureWarning: The `device` argument is deprecated and will be removed in v5 of Transformers.\n",
      "  warnings.warn(\n",
      "/root/miniconda3/envs/STA/lib/python3.9/site-packages/torch/utils/checkpoint.py:31: UserWarning: None of the inputs have requires_grad=True. Gradients will be None\n",
      "  warnings.warn(\"None of the inputs have requires_grad=True. Gradients will be None\")\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "frame 23 writed 23, obj_num 0\n",
      "./pikavideos/20230823-222352/cup/mask_Old_Orthodox_In_the_forefront_of_the_artwork_a_detailed_portrayal_of_an_Old_Orthodox_diagram_by_Gy__seed16081529403875982519.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:25:23 Det num: 1, Positive num: 0, Positive rate: 0.0  Vid num: 1, Num of 'cup' detected: 0.0, Prompt: @fatman2021b Prompt: Old Orthodox In the forefront of the artwork, a detailed portrayal of an Old Orthodox diagram by György Rózsahegyi lies on a table. Accompanying it are an aged photobook and a front label designed in the captivating style of folk art.  Central to the piece is a luminous humanoid figure, its intricate features and radiant motifs captivating the observer's gaze. Encircled by celestial dust and planets, it exudes the impression of soaring through the cosmos.  Foreground figures don biblical attire, their outstretched palms emanating a palpable aura of sanctified might. The handcrafted ivory sculptures upon the altar exude an air of ancient grandeur, while the sacred cup of understanding shrouds itself in spiritual enigma.  Doughnuts arrayed upon a wooden table in the backdrop present an artistic arrangement, their delectable visage evoking a sense of opulent indulgence. A Romanesque painting on the wall injects an essence of bygone history, while crimson fluid upon church walls evokes visceral passion and turmoil.  A Qajar painting in the distance lends a medieval opulence to the scene, while an Ethiopian woodcut exudes an aura of exotic mystique. The Old Orthodox diagram, a focal point on the foreground table, cloaks itself in esoteric intrigue, complemented by the vintage photobook and front label which breathe forth nostalgia and chronicles of yore.  Author: @fatman2021b (edited), Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Old_Orthodox_In_the_forefront_of_the_artwork_a_detailed_portrayal_of_an_Old_Orthodox_diagram_by_Gy__seed16081529403875982519.txt\n",
      "2023-08-23 22:25:23 Det num: 1, Positive num: 0, Positive rate: 0.0  Vid num: 1, Num of 'cup' detected: 0.0, Prompt: @fatman2021b Prompt: Old Orthodox In the forefront of the artwork, a detailed portrayal of an Old Orthodox diagram by György Rózsahegyi lies on a table. Accompanying it are an aged photobook and a front label designed in the captivating style of folk art.  Central to the piece is a luminous humanoid figure, its intricate features and radiant motifs captivating the observer's gaze. Encircled by celestial dust and planets, it exudes the impression of soaring through the cosmos.  Foreground figures don biblical attire, their outstretched palms emanating a palpable aura of sanctified might. The handcrafted ivory sculptures upon the altar exude an air of ancient grandeur, while the sacred cup of understanding shrouds itself in spiritual enigma.  Doughnuts arrayed upon a wooden table in the backdrop present an artistic arrangement, their delectable visage evoking a sense of opulent indulgence. A Romanesque painting on the wall injects an essence of bygone history, while crimson fluid upon church walls evokes visceral passion and turmoil.  A Qajar painting in the distance lends a medieval opulence to the scene, while an Ethiopian woodcut exudes an aura of exotic mystique. The Old Orthodox diagram, a focal point on the foreground table, cloaks itself in esoteric intrigue, complemented by the vintage photobook and front label which breathe forth nostalgia and chronicles of yore.  Author: @fatman2021b (edited), Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Old_Orthodox_In_the_forefront_of_the_artwork_a_detailed_portrayal_of_an_Old_Orthodox_diagram_by_Gy__seed16081529403875982519.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/cup/gif_Old_Orthodox_In_the_forefront_of_the_artwork_a_detailed_portrayal_of_an_Old_Orthodox_diagram_by_Gy__seed16081529403875982519.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/car/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/car/mask_a_crazy_racing_car_kicking.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:25:37 Det num: 2, Positive num: 1, Positive rate: 0.5  Vid num: 2, Num of 'car' detected: 1.0, Prompt: @wolljo // tzefix Prompt: a crazy racing car kicking  Image: 1 Attachment  Author: @wolljo // tzefix, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/a_crazy_racing_car_kicking.txt\n",
      "2023-08-23 22:25:37 Det num: 2, Positive num: 1, Positive rate: 0.5  Vid num: 2, Num of 'car' detected: 1.0, Prompt: @wolljo // tzefix Prompt: a crazy racing car kicking  Image: 1 Attachment  Author: @wolljo // tzefix, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/a_crazy_racing_car_kicking.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/car/gif_a_crazy_racing_car_kicking.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/tv/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/tv/mask_stream_of_hot_espresso_poured_on_clear_ice_cubes_in_a_clear_glass__tv_commercial_uhd_close-up_sho.mp4 saved\n",
      "./pikavideos/20230823-222352/tv/gif_stream_of_hot_espresso_poured_on_clear_ice_cubes_in_a_clear_glass__tv_commercial_uhd_close-up_sho.gif saved\n",
      "\n",
      "finished\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:25:50 Det num: 3, Positive num: 2, Positive rate: 0.6666666666666666  Vid num: 3, Num of 'tv' detected: 1.0, Prompt: @Go Bonkers liked a video. (Prompt: stream of hot espresso poured on clear ice cubes in a clear glass,  tv commercial, uhd, close-up shot, satisfying, delicious, highest quality, bright white volumetric high key lighting, 8k  Author: @brian), Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/stream_of_hot_espresso_poured_on_clear_ice_cubes_in_a_clear_glass__tv_commercial_uhd_close-up_sho.txt\n",
      "2023-08-23 22:25:50 Det num: 3, Positive num: 2, Positive rate: 0.6666666666666666  Vid num: 3, Num of 'tv' detected: 1.0, Prompt: @Go Bonkers liked a video. (Prompt: stream of hot espresso poured on clear ice cubes in a clear glass,  tv commercial, uhd, close-up shot, satisfying, delicious, highest quality, bright white volumetric high key lighting, 8k  Author: @brian), Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/stream_of_hot_espresso_poured_on_clear_ice_cubes_in_a_clear_glass__tv_commercial_uhd_close-up_sho.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Directory created: ./pikavideos/20230823-222352/laptop/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/laptop/mask_A_real-life_resolution_raw_video_of_the_girl_looking_at_her_laptop_curtain_moving_in_the_background_seed16407808815513348727.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:26:02 Det num: 4, Positive num: 3, Positive rate: 0.75  Vid num: 4, Num of 'laptop' detected: 1.0, Prompt: @Riobel liked a video of @Riobel. (Prompt: A real-life resolution raw video of the girl looking at her laptop, curtain moving in the background slowly, high life resolution, 8k, leg motion 0.8, motions 1.0, hair motions 0.8, eye motion 0.4  Image: 1 Attachment  Author: @Riobel), Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/A_real-life_resolution_raw_video_of_the_girl_looking_at_her_laptop_curtain_moving_in_the_background_seed16407808815513348727.txt\n",
      "2023-08-23 22:26:02 Det num: 4, Positive num: 3, Positive rate: 0.75  Vid num: 4, Num of 'laptop' detected: 1.0, Prompt: @Riobel liked a video of @Riobel. (Prompt: A real-life resolution raw video of the girl looking at her laptop, curtain moving in the background slowly, high life resolution, 8k, leg motion 0.8, motions 1.0, hair motions 0.8, eye motion 0.4  Image: 1 Attachment  Author: @Riobel), Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/A_real-life_resolution_raw_video_of_the_girl_looking_at_her_laptop_curtain_moving_in_the_background_seed16407808815513348727.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/laptop/gif_A_real-life_resolution_raw_video_of_the_girl_looking_at_her_laptop_curtain_moving_in_the_background_seed16407808815513348727.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/dog/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 2\n",
      "./pikavideos/20230823-222352/dog/mask_Dogs_playing_with_the_gadget__Image__1_Attachment_seed17016898293636560034.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:26:15 Det num: 5, Positive num: 4, Positive rate: 0.8  Vid num: 5, Num of 'dog' detected: 2.0, Prompt: @Weiss Prompt: Dogs playing with the gadget  Image: 1 Attachment  Author: @Weiss, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Dogs_playing_with_the_gadget__Image__1_Attachment_seed17016898293636560034.txt\n",
      "2023-08-23 22:26:15 Det num: 5, Positive num: 4, Positive rate: 0.8  Vid num: 5, Num of 'dog' detected: 2.0, Prompt: @Weiss Prompt: Dogs playing with the gadget  Image: 1 Attachment  Author: @Weiss, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Dogs_playing_with_the_gadget__Image__1_Attachment_seed17016898293636560034.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/dog/gif_Dogs_playing_with_the_gadget__Image__1_Attachment_seed17016898293636560034.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/person/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 21 writed 23, obj_num 1\r"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:26:26 Det num: 6, Positive num: 5, Positive rate: 0.8333333333333334  Vid num: 6, Num of 'person' detected: 1.0, Prompt: @DREX15704080 Prompt: [Best quality, unrealengine5,3d,  A puppet wrapped in branches and flowers, with branches growing, dream, first-person perspective, fantasy, photorealistic, Ultimate Aesthetics, 4K,  --gs 25 --neg \"low quality, people,blur,blurry,bad anatomy,noise,flicker,duplicate,mess\" --ar 16:9 --seed 2020]  Author: @DREX15704080, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Best_quality_unrealengine53d__A_puppet_wrapped_in_branches_and_flowers_with_branches_growing_d_seed2457769037697740885.txt\n",
      "2023-08-23 22:26:26 Det num: 6, Positive num: 5, Positive rate: 0.8333333333333334  Vid num: 6, Num of 'person' detected: 1.0, Prompt: @DREX15704080 Prompt: [Best quality, unrealengine5,3d,  A puppet wrapped in branches and flowers, with branches growing, dream, first-person perspective, fantasy, photorealistic, Ultimate Aesthetics, 4K,  --gs 25 --neg \"low quality, people,blur,blurry,bad anatomy,noise,flicker,duplicate,mess\" --ar 16:9 --seed 2020]  Author: @DREX15704080, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Best_quality_unrealengine53d__A_puppet_wrapped_in_branches_and_flowers_with_branches_growing_d_seed2457769037697740885.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "frame 23 writed\n",
      "./pikavideos/20230823-222352/person/mask_Best_quality_unrealengine53d__A_puppet_wrapped_in_branches_and_flowers_with_branches_growing_d_seed2457769037697740885.mp4 saved\n",
      "./pikavideos/20230823-222352/person/gif_Best_quality_unrealengine53d__A_puppet_wrapped_in_branches_and_flowers_with_branches_growing_d_seed2457769037697740885.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/couch/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/couch/mask_sigmund_freud__drowning_inside_a_big_leather_couch_with_leather_pillows_top-down_view_analog_film__seed2403557288435654523.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:26:39 Det num: 7, Positive num: 6, Positive rate: 0.8571428571428571  Vid num: 7, Num of 'couch' detected: 1.0, Prompt: @Paul Poutre Prompt: \"sigmund freud\" drowning inside a big leather couch with leather pillows, top-down view analog film photo   -motion 2  Author: @Paul Poutre, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/sigmund_freud__drowning_inside_a_big_leather_couch_with_leather_pillows_top-down_view_analog_film__seed2403557288435654523.txt\n",
      "2023-08-23 22:26:39 Det num: 7, Positive num: 6, Positive rate: 0.8571428571428571  Vid num: 7, Num of 'couch' detected: 1.0, Prompt: @Paul Poutre Prompt: \"sigmund freud\" drowning inside a big leather couch with leather pillows, top-down view analog film photo   -motion 2  Author: @Paul Poutre, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/sigmund_freud__drowning_inside_a_big_leather_couch_with_leather_pillows_top-down_view_analog_film__seed2403557288435654523.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/couch/gif_sigmund_freud__drowning_inside_a_big_leather_couch_with_leather_pillows_top-down_view_analog_film__seed2403557288435654523.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/airplane/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/airplane/mask_a_man_walking_down_from_airplanedetailed_full_color8k--ar_9_16_seed9354222449310172492.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:26:52 Det num: 8, Positive num: 7, Positive rate: 0.875  Vid num: 8, Num of 'airplane' detected: 1.0, Prompt: @chinna Prompt: a man walking down from airplane,detailed full color,8k,--ar 9:16  Author: @chinna, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/a_man_walking_down_from_airplanedetailed_full_color8k--ar_9_16_seed9354222449310172492.txt\n",
      "2023-08-23 22:26:52 Det num: 8, Positive num: 7, Positive rate: 0.875  Vid num: 8, Num of 'airplane' detected: 1.0, Prompt: @chinna Prompt: a man walking down from airplane,detailed full color,8k,--ar 9:16  Author: @chinna, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/a_man_walking_down_from_airplanedetailed_full_color8k--ar_9_16_seed9354222449310172492.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/airplane/gif_a_man_walking_down_from_airplanedetailed_full_color8k--ar_9_16_seed9354222449310172492.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/person/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/person/mask_first_person_point_of_view_walking_through_a_beautiful_hedge_maze_with_flowers_in_the_bushes_the_s_seed6800058714564950160.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:27:04 Det num: 9, Positive num: 8, Positive rate: 0.8888888888888888  Vid num: 9, Num of 'person' detected: 1.0, Prompt: @Lil Lion Prompt: first person point of view, walking through a beautiful hedge maze with flowers in the bushes, the sun shines bright and warm overhead  Author: @Lil Lion, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/first_person_point_of_view_walking_through_a_beautiful_hedge_maze_with_flowers_in_the_bushes_the_s_seed6800058714564950160.txt\n",
      "2023-08-23 22:27:04 Det num: 9, Positive num: 8, Positive rate: 0.8888888888888888  Vid num: 9, Num of 'person' detected: 1.0, Prompt: @Lil Lion Prompt: first person point of view, walking through a beautiful hedge maze with flowers in the bushes, the sun shines bright and warm overhead  Author: @Lil Lion, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/first_person_point_of_view_walking_through_a_beautiful_hedge_maze_with_flowers_in_the_bushes_the_s_seed6800058714564950160.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/person/gif_first_person_point_of_view_walking_through_a_beautiful_hedge_maze_with_flowers_in_the_bushes_the_s_seed6800058714564950160.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/tv/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 0\n",
      "./pikavideos/20230823-222352/tv/mask_beautiful_woman_reaching_out_hand_to_camera_seed11376165131429940296.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:27:16 Det num: 10, Positive num: 8, Positive rate: 0.8  Vid num: 10, Num of 'tv' detected: 0.0, Prompt: @tellyourfriends.tv Prompt: beautiful woman reaching out hand to camera  Author: @tellyourfriends.tv, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/beautiful_woman_reaching_out_hand_to_camera_seed11376165131429940296.txt\n",
      "2023-08-23 22:27:16 Det num: 10, Positive num: 8, Positive rate: 0.8  Vid num: 10, Num of 'tv' detected: 0.0, Prompt: @tellyourfriends.tv Prompt: beautiful woman reaching out hand to camera  Author: @tellyourfriends.tv, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/beautiful_woman_reaching_out_hand_to_camera_seed11376165131429940296.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/tv/gif_beautiful_woman_reaching_out_hand_to_camera_seed11376165131429940296.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/dog/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/dog/mask_dog_smoke_weeds__Image__1_Attachment_seed630173737924043715.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:27:28 Det num: 11, Positive num: 9, Positive rate: 0.8181818181818182  Vid num: 11, Num of 'dog' detected: 1.0, Prompt: @nikolai Prompt: dog smoke weeds  Image: 1 Attachment  Author: @nikolai, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/dog_smoke_weeds__Image__1_Attachment_seed630173737924043715.txt\n",
      "2023-08-23 22:27:28 Det num: 11, Positive num: 9, Positive rate: 0.8181818181818182  Vid num: 11, Num of 'dog' detected: 1.0, Prompt: @nikolai Prompt: dog smoke weeds  Image: 1 Attachment  Author: @nikolai, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/dog_smoke_weeds__Image__1_Attachment_seed630173737924043715.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/dog/gif_dog_smoke_weeds__Image__1_Attachment_seed630173737924043715.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/tv/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 0\n",
      "./pikavideos/20230823-222352/tv/mask_a_girl_holding_a_tv_with_cables_from_it_on_it_in_the_style_of_eerie_landscapes_books_and_portfolio_seed16174571395639179311.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:27:41 Det num: 12, Positive num: 9, Positive rate: 0.75  Vid num: 12, Num of 'tv' detected: 0.0, Prompt: @Babastti Prompt: a girl holding a tv with cables from it on it, in the style of eerie landscapes, books and portfolios, dollcore, tabloid photography, muted colours, oversized objects, photorealistic portraits }  Author: @Babastti, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/a_girl_holding_a_tv_with_cables_from_it_on_it_in_the_style_of_eerie_landscapes_books_and_portfolio_seed16174571395639179311.txt\n",
      "2023-08-23 22:27:41 Det num: 12, Positive num: 9, Positive rate: 0.75  Vid num: 12, Num of 'tv' detected: 0.0, Prompt: @Babastti Prompt: a girl holding a tv with cables from it on it, in the style of eerie landscapes, books and portfolios, dollcore, tabloid photography, muted colours, oversized objects, photorealistic portraits }  Author: @Babastti, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/a_girl_holding_a_tv_with_cables_from_it_on_it_in_the_style_of_eerie_landscapes_books_and_portfolio_seed16174571395639179311.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/tv/gif_a_girl_holding_a_tv_with_cables_from_it_on_it_in_the_style_of_eerie_landscapes_books_and_portfolio_seed16174571395639179311.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/book/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 0\n",
      "./pikavideos/20230823-222352/book/mask_a_girl_holding_a_tv_with_cables_from_it_on_it_in_the_style_of_eerie_landscapes_books_and_portfolio_seed16174571395639179311.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:27:52 Det num: 13, Positive num: 9, Positive rate: 0.6923076923076923  Vid num: 12, Num of 'book' detected: 0.0, Prompt: @Babastti Prompt: a girl holding a tv with cables from it on it, in the style of eerie landscapes, books and portfolios, dollcore, tabloid photography, muted colours, oversized objects, photorealistic portraits }  Author: @Babastti, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/a_girl_holding_a_tv_with_cables_from_it_on_it_in_the_style_of_eerie_landscapes_books_and_portfolio_seed16174571395639179311.txt\n",
      "2023-08-23 22:27:52 Det num: 13, Positive num: 9, Positive rate: 0.6923076923076923  Vid num: 12, Num of 'book' detected: 0.0, Prompt: @Babastti Prompt: a girl holding a tv with cables from it on it, in the style of eerie landscapes, books and portfolios, dollcore, tabloid photography, muted colours, oversized objects, photorealistic portraits }  Author: @Babastti, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/a_girl_holding_a_tv_with_cables_from_it_on_it_in_the_style_of_eerie_landscapes_books_and_portfolio_seed16174571395639179311.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/book/gif_a_girl_holding_a_tv_with_cables_from_it_on_it_in_the_style_of_eerie_landscapes_books_and_portfolio_seed16174571395639179311.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/clock/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 22 writed 23, obj_num 0\r"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:28:03 Det num: 14, Positive num: 9, Positive rate: 0.6428571428571429  Vid num: 13, Num of 'clock' detected: 0.0, Prompt: @creAItive1 Prompt: a mid range closeup of a high detailed ancient hourglass clock with a slightly out of focus sand and dunes desert background and tree camels walking toward the hourglass clock -ar 16:9 4K - motion 2  Author: @creAItive1, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/a_mid_range_closeup_of_a_high_detailed_ancient_hourglass_clock_with_a_slightly_out_of_focus_sand_and_seed11393968909632940198.txt\n",
      "2023-08-23 22:28:03 Det num: 14, Positive num: 9, Positive rate: 0.6428571428571429  Vid num: 13, Num of 'clock' detected: 0.0, Prompt: @creAItive1 Prompt: a mid range closeup of a high detailed ancient hourglass clock with a slightly out of focus sand and dunes desert background and tree camels walking toward the hourglass clock -ar 16:9 4K - motion 2  Author: @creAItive1, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/a_mid_range_closeup_of_a_high_detailed_ancient_hourglass_clock_with_a_slightly_out_of_focus_sand_and_seed11393968909632940198.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "frame 23 writed\n",
      "./pikavideos/20230823-222352/clock/mask_a_mid_range_closeup_of_a_high_detailed_ancient_hourglass_clock_with_a_slightly_out_of_focus_sand_and_seed11393968909632940198.mp4 saved\n",
      "./pikavideos/20230823-222352/clock/gif_a_mid_range_closeup_of_a_high_detailed_ancient_hourglass_clock_with_a_slightly_out_of_focus_sand_and_seed11393968909632940198.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/horse/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 2\n",
      "./pikavideos/20230823-222352/horse/mask_Horse_with_wings_on_a_coast_similar_to_Scotland_seed18012505168770201443.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:28:16 Det num: 15, Positive num: 10, Positive rate: 0.6666666666666666  Vid num: 14, Num of 'horse' detected: 2.0, Prompt: @Denden Prompt: Horse with wings on a coast similar to Scotland  Author: @Denden, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Horse_with_wings_on_a_coast_similar_to_Scotland_seed18012505168770201443.txt\n",
      "2023-08-23 22:28:16 Det num: 15, Positive num: 10, Positive rate: 0.6666666666666666  Vid num: 14, Num of 'horse' detected: 2.0, Prompt: @Denden Prompt: Horse with wings on a coast similar to Scotland  Author: @Denden, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Horse_with_wings_on_a_coast_similar_to_Scotland_seed18012505168770201443.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/horse/gif_Horse_with_wings_on_a_coast_similar_to_Scotland_seed18012505168770201443.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/bus/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 21 writed 23, obj_num 0\r"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:28:28 Det num: 16, Positive num: 10, Positive rate: 0.625  Vid num: 15, Num of 'bus' detected: 0.0, Prompt: @discoking Prompt: lonely people in scifi bus cinematic, HD, 4k resolution, sharp, sony ar7  -neg \"cartoon, vector art, clipart, 3D, distorted, amateur, split \"  -gs 30  Image: 1 Attachment  Author: @discoking, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/lonely_people_in_scifi_bus_cinematic_HD_4k_resolution_sharp_sony_ar7__-neg__cartoon_vector_art_seed13872446135975882256.txt\n",
      "2023-08-23 22:28:28 Det num: 16, Positive num: 10, Positive rate: 0.625  Vid num: 15, Num of 'bus' detected: 0.0, Prompt: @discoking Prompt: lonely people in scifi bus cinematic, HD, 4k resolution, sharp, sony ar7  -neg \"cartoon, vector art, clipart, 3D, distorted, amateur, split \"  -gs 30  Image: 1 Attachment  Author: @discoking, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/lonely_people_in_scifi_bus_cinematic_HD_4k_resolution_sharp_sony_ar7__-neg__cartoon_vector_art_seed13872446135975882256.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "frame 23 writed\n",
      "./pikavideos/20230823-222352/bus/mask_lonely_people_in_scifi_bus_cinematic_HD_4k_resolution_sharp_sony_ar7__-neg__cartoon_vector_art_seed13872446135975882256.mp4 saved\n",
      "./pikavideos/20230823-222352/bus/gif_lonely_people_in_scifi_bus_cinematic_HD_4k_resolution_sharp_sony_ar7__-neg__cartoon_vector_art_seed13872446135975882256.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/bed/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/bed/mask_barbie__sitting_watching_tv_in_a_dirty_bed_room_seed5785052468425344771.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:28:39 Det num: 17, Positive num: 11, Positive rate: 0.6470588235294118  Vid num: 16, Num of 'bed' detected: 1.0, Prompt: @radotw Prompt: barbie  sitting, watching tv in a dirty bed room  Author: @radotw, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/barbie__sitting_watching_tv_in_a_dirty_bed_room_seed5785052468425344771.txt\n",
      "2023-08-23 22:28:39 Det num: 17, Positive num: 11, Positive rate: 0.6470588235294118  Vid num: 16, Num of 'bed' detected: 1.0, Prompt: @radotw Prompt: barbie  sitting, watching tv in a dirty bed room  Author: @radotw, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/barbie__sitting_watching_tv_in_a_dirty_bed_room_seed5785052468425344771.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/bed/gif_barbie__sitting_watching_tv_in_a_dirty_bed_room_seed5785052468425344771.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/tv/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/tv/mask_barbie__sitting_watching_tv_in_a_dirty_bed_room_seed5785052468425344771.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:28:50 Det num: 18, Positive num: 12, Positive rate: 0.6666666666666666  Vid num: 16, Num of 'tv' detected: 1.0, Prompt: @radotw Prompt: barbie  sitting, watching tv in a dirty bed room  Author: @radotw, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/barbie__sitting_watching_tv_in_a_dirty_bed_room_seed5785052468425344771.txt\n",
      "2023-08-23 22:28:50 Det num: 18, Positive num: 12, Positive rate: 0.6666666666666666  Vid num: 16, Num of 'tv' detected: 1.0, Prompt: @radotw Prompt: barbie  sitting, watching tv in a dirty bed room  Author: @radotw, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/barbie__sitting_watching_tv_in_a_dirty_bed_room_seed5785052468425344771.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/tv/gif_barbie__sitting_watching_tv_in_a_dirty_bed_room_seed5785052468425344771.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/cat/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 0\n",
      "./pikavideos/20230823-222352/cat/mask_cat_smiles_and_laughs_-ar_4_3__Image__1_Attachment_seed15097852949522318220.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:29:02 Det num: 19, Positive num: 12, Positive rate: 0.631578947368421  Vid num: 17, Num of 'cat' detected: 0.0, Prompt: @Oks Prompt: cat smiles and laughs -ar 4:3  Image: 1 Attachment  Author: @Oks, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/cat_smiles_and_laughs_-ar_4_3__Image__1_Attachment_seed15097852949522318220.txt\n",
      "2023-08-23 22:29:02 Det num: 19, Positive num: 12, Positive rate: 0.631578947368421  Vid num: 17, Num of 'cat' detected: 0.0, Prompt: @Oks Prompt: cat smiles and laughs -ar 4:3  Image: 1 Attachment  Author: @Oks, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/cat_smiles_and_laughs_-ar_4_3__Image__1_Attachment_seed15097852949522318220.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/cat/gif_cat_smiles_and_laughs_-ar_4_3__Image__1_Attachment_seed15097852949522318220.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/dog/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 21 writed 23, obj_num 1\r"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:29:15 Det num: 20, Positive num: 13, Positive rate: 0.65  Vid num: 18, Num of 'dog' detected: 1.0, Prompt: @kentashiyoko Prompt: a man kissing a white dog  Image: 1 Attachment  Author: @kentashiyoko, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/a_man_kissing_a_white_dog__Image__1_Attachment_seed2821337665348054621.txt\n",
      "2023-08-23 22:29:15 Det num: 20, Positive num: 13, Positive rate: 0.65  Vid num: 18, Num of 'dog' detected: 1.0, Prompt: @kentashiyoko Prompt: a man kissing a white dog  Image: 1 Attachment  Author: @kentashiyoko, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/a_man_kissing_a_white_dog__Image__1_Attachment_seed2821337665348054621.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "frame 23 writed\n",
      "./pikavideos/20230823-222352/dog/mask_a_man_kissing_a_white_dog__Image__1_Attachment_seed2821337665348054621.mp4 saved\n",
      "./pikavideos/20230823-222352/dog/gif_a_man_kissing_a_white_dog__Image__1_Attachment_seed2821337665348054621.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/cat/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 21 writed 23, obj_num 1\r"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:29:30 Det num: 21, Positive num: 14, Positive rate: 0.6666666666666666  Vid num: 19, Num of 'cat' detected: 1.0, Prompt: @Reya Prompt: A lifelike 3D model of a cat, playfully chasing a ball, through a cozy living room, the cat's movements are fluid and natural,  sing advanced 3D animation techniques to achieve realistic motion - 9:16  Image: 1 Attachment  Author: @Reya, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/A_lifelike_3D_model_of_a_cat_playfully_chasing_a_ball_through_a_cozy_living_room_the_cat_s_moveme_seed791572259697976577.txt\n",
      "2023-08-23 22:29:30 Det num: 21, Positive num: 14, Positive rate: 0.6666666666666666  Vid num: 19, Num of 'cat' detected: 1.0, Prompt: @Reya Prompt: A lifelike 3D model of a cat, playfully chasing a ball, through a cozy living room, the cat's movements are fluid and natural,  sing advanced 3D animation techniques to achieve realistic motion - 9:16  Image: 1 Attachment  Author: @Reya, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/A_lifelike_3D_model_of_a_cat_playfully_chasing_a_ball_through_a_cozy_living_room_the_cat_s_moveme_seed791572259697976577.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "frame 23 writed\n",
      "./pikavideos/20230823-222352/cat/mask_A_lifelike_3D_model_of_a_cat_playfully_chasing_a_ball_through_a_cozy_living_room_the_cat_s_moveme_seed791572259697976577.mp4 saved\n",
      "./pikavideos/20230823-222352/cat/gif_A_lifelike_3D_model_of_a_cat_playfully_chasing_a_ball_through_a_cozy_living_room_the_cat_s_moveme_seed791572259697976577.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/dog/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 21 writed 23, obj_num 0\r"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:29:41 Det num: 22, Positive num: 14, Positive rate: 0.6363636363636364  Vid num: 20, Num of 'dog' detected: 0.0, Prompt: @Red Nelloh Prompt: the dog is sniffing  Image: 1 Attachment  Author: @Red Nelloh, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/the_dog_is_sniffing__Image__1_Attachment_seed18221327398837311923.txt\n",
      "2023-08-23 22:29:41 Det num: 22, Positive num: 14, Positive rate: 0.6363636363636364  Vid num: 20, Num of 'dog' detected: 0.0, Prompt: @Red Nelloh Prompt: the dog is sniffing  Image: 1 Attachment  Author: @Red Nelloh, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/the_dog_is_sniffing__Image__1_Attachment_seed18221327398837311923.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "frame 23 writed\n",
      "./pikavideos/20230823-222352/dog/mask_the_dog_is_sniffing__Image__1_Attachment_seed18221327398837311923.mp4 saved\n",
      "./pikavideos/20230823-222352/dog/gif_the_dog_is_sniffing__Image__1_Attachment_seed18221327398837311923.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/car/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/car/mask_Selfie_in_the_car4k__Image__1_Attachment_seed14973506488214882686.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:29:54 Det num: 23, Positive num: 15, Positive rate: 0.6521739130434783  Vid num: 21, Num of 'car' detected: 1.0, Prompt: @OMO Prompt: Selfie in the car,4k  Image: 1 Attachment  Author: @OMO, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Selfie_in_the_car4k__Image__1_Attachment_seed14973506488214882686.txt\n",
      "2023-08-23 22:29:54 Det num: 23, Positive num: 15, Positive rate: 0.6521739130434783  Vid num: 21, Num of 'car' detected: 1.0, Prompt: @OMO Prompt: Selfie in the car,4k  Image: 1 Attachment  Author: @OMO, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Selfie_in_the_car4k__Image__1_Attachment_seed14973506488214882686.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/car/gif_Selfie_in_the_car4k__Image__1_Attachment_seed14973506488214882686.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/cat/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 0\n",
      "./pikavideos/20230823-222352/cat/mask_Movie_shot_blue_eyed_white_cat_turning_its_head_autumn_season_wind_blowing_maple_leaves_falling__seed14700925975793508048.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:30:06 Det num: 24, Positive num: 15, Positive rate: 0.625  Vid num: 22, Num of 'cat' detected: 0.0, Prompt: @caihe Prompt: Movie shot, blue eyed white cat turning its head, autumn season, wind blowing maple leaves falling, wind blowing fur, 4k,9:16  Author: @caihe, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Movie_shot_blue_eyed_white_cat_turning_its_head_autumn_season_wind_blowing_maple_leaves_falling__seed14700925975793508048.txt\n",
      "2023-08-23 22:30:06 Det num: 24, Positive num: 15, Positive rate: 0.625  Vid num: 22, Num of 'cat' detected: 0.0, Prompt: @caihe Prompt: Movie shot, blue eyed white cat turning its head, autumn season, wind blowing maple leaves falling, wind blowing fur, 4k,9:16  Author: @caihe, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Movie_shot_blue_eyed_white_cat_turning_its_head_autumn_season_wind_blowing_maple_leaves_falling__seed14700925975793508048.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/cat/gif_Movie_shot_blue_eyed_white_cat_turning_its_head_autumn_season_wind_blowing_maple_leaves_falling__seed14700925975793508048.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/cat/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 21 writed 23, obj_num 1\r"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:30:23 Det num: 25, Positive num: 16, Positive rate: 0.64  Vid num: 23, Num of 'cat' detected: 1.0, Prompt: Pika BOT 07/16/2023 12:35 PM@Shrishh Prompt: Dancing Cat  Image: 1 Attachment  Author: @Shrishh, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Dancing_Cat.txt\n",
      "2023-08-23 22:30:23 Det num: 25, Positive num: 16, Positive rate: 0.64  Vid num: 23, Num of 'cat' detected: 1.0, Prompt: Pika BOT 07/16/2023 12:35 PM@Shrishh Prompt: Dancing Cat  Image: 1 Attachment  Author: @Shrishh, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Dancing_Cat.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "frame 23 writed\n",
      "./pikavideos/20230823-222352/cat/mask_Dancing_Cat.mp4 saved\n",
      "./pikavideos/20230823-222352/cat/gif_Dancing_Cat.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/bed/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 21 writed 23, obj_num 1\r"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:30:36 Det num: 26, Positive num: 17, Positive rate: 0.6538461538461539  Vid num: 24, Num of 'bed' detected: 1.0, Prompt: @DCF Prompt: man scared to death in the bed, dark scene, horror, cinematic look, 8k  Author: @DCF, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/man_scared_to_death_in_the_bed_dark_scene_horror_cinematic_look_8k_seed4808118093159940398.txt\n",
      "2023-08-23 22:30:36 Det num: 26, Positive num: 17, Positive rate: 0.6538461538461539  Vid num: 24, Num of 'bed' detected: 1.0, Prompt: @DCF Prompt: man scared to death in the bed, dark scene, horror, cinematic look, 8k  Author: @DCF, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/man_scared_to_death_in_the_bed_dark_scene_horror_cinematic_look_8k_seed4808118093159940398.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "frame 23 writed\n",
      "./pikavideos/20230823-222352/bed/mask_man_scared_to_death_in_the_bed_dark_scene_horror_cinematic_look_8k_seed4808118093159940398.mp4 saved\n",
      "./pikavideos/20230823-222352/bed/gif_man_scared_to_death_in_the_bed_dark_scene_horror_cinematic_look_8k_seed4808118093159940398.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/motorcycle/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/motorcycle/mask_a_white_and_gray_themed_electric_motorcycle_parked_in_the_city_streets_Bright_sunlight_seed2283534430067221408.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:30:51 Det num: 27, Positive num: 18, Positive rate: 0.6666666666666666  Vid num: 25, Num of 'motorcycle' detected: 1.0, Prompt: @crystalwizard liked a video of @sooloooo. (Prompt: a white and gray themed electric motorcycle parked in the city streets, Bright sunlight  Author: @sooloooo), Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/a_white_and_gray_themed_electric_motorcycle_parked_in_the_city_streets_Bright_sunlight_seed2283534430067221408.txt\n",
      "2023-08-23 22:30:51 Det num: 27, Positive num: 18, Positive rate: 0.6666666666666666  Vid num: 25, Num of 'motorcycle' detected: 1.0, Prompt: @crystalwizard liked a video of @sooloooo. (Prompt: a white and gray themed electric motorcycle parked in the city streets, Bright sunlight  Author: @sooloooo), Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/a_white_and_gray_themed_electric_motorcycle_parked_in_the_city_streets_Bright_sunlight_seed2283534430067221408.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/motorcycle/gif_a_white_and_gray_themed_electric_motorcycle_parked_in_the_city_streets_Bright_sunlight_seed2283534430067221408.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/bench/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/bench/mask_A_woman_sitting_on_a_park_bench_in_the_style_of_Annie_Leibovitz_Dark_Colors_Deeper_richer_shades_seed2483748260471034644.mp4 saved\n",
      "./pikavideos/20230823-222352/bench/gif_A_woman_sitting_on_a_park_bench_in_the_style_of_Annie_Leibovitz_Dark_Colors_Deeper_richer_shades_seed2483748260471034644.gif saved\n",
      "\n",
      "finished\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:31:02 Det num: 28, Positive num: 19, Positive rate: 0.6785714285714286  Vid num: 26, Num of 'bench' detected: 1.0, Prompt: @Eugene Prompt: A woman sitting on a park bench in the style of Annie Leibovitz, Dark Colors, Deeper, richer shades, Ground Level Shot, Canon EOS 1DX Mark 3 camera with wide lens, 4K, -motion 4 -ar 16:9  Author: @Eugene, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/A_woman_sitting_on_a_park_bench_in_the_style_of_Annie_Leibovitz_Dark_Colors_Deeper_richer_shades_seed2483748260471034644.txt\n",
      "2023-08-23 22:31:02 Det num: 28, Positive num: 19, Positive rate: 0.6785714285714286  Vid num: 26, Num of 'bench' detected: 1.0, Prompt: @Eugene Prompt: A woman sitting on a park bench in the style of Annie Leibovitz, Dark Colors, Deeper, richer shades, Ground Level Shot, Canon EOS 1DX Mark 3 camera with wide lens, 4K, -motion 4 -ar 16:9  Author: @Eugene, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/A_woman_sitting_on_a_park_bench_in_the_style_of_Annie_Leibovitz_Dark_Colors_Deeper_richer_shades_seed2483748260471034644.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Directory already exists: ./pikavideos/20230823-222352/car/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 0\n",
      "./pikavideos/20230823-222352/car/mask_car_reaches_speed_of_light_cinematic_move_gimbel_motion__Image__1_Attachment_seed5726449327133817216.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:31:14 Det num: 29, Positive num: 19, Positive rate: 0.6551724137931034  Vid num: 27, Num of 'car' detected: 0.0, Prompt: @Bader#367 Prompt: car reaches speed of light, cinematic, move gimbel motion  Image: 1 Attachment  Author: @Bader#367, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/car_reaches_speed_of_light_cinematic_move_gimbel_motion__Image__1_Attachment_seed5726449327133817216.txt\n",
      "2023-08-23 22:31:14 Det num: 29, Positive num: 19, Positive rate: 0.6551724137931034  Vid num: 27, Num of 'car' detected: 0.0, Prompt: @Bader#367 Prompt: car reaches speed of light, cinematic, move gimbel motion  Image: 1 Attachment  Author: @Bader#367, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/car_reaches_speed_of_light_cinematic_move_gimbel_motion__Image__1_Attachment_seed5726449327133817216.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/car/gif_car_reaches_speed_of_light_cinematic_move_gimbel_motion__Image__1_Attachment_seed5726449327133817216.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/cup/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 0\n",
      "./pikavideos/20230823-222352/cup/mask_Old_Orthodox_In_the_forefront_of_the_artwork_a_detailed_portrayal_of_an_Old_Orthodox_diagram_by_Gy__seed18206250958877586897.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:31:29 Det num: 30, Positive num: 19, Positive rate: 0.6333333333333333  Vid num: 28, Num of 'cup' detected: 0.0, Prompt: @fatman2021b Prompt: Old Orthodox In the forefront of the artwork, a detailed portrayal of an Old Orthodox diagram by György Rózsahegyi lies on a table. Accompanying it are an aged photobook and a front label designed in the captivating style of folk art.  Central to the piece is a luminous humanoid figure, its intricate features and radiant motifs captivating the observer's gaze. Encircled by celestial dust and planets, it exudes the impression of soaring through the cosmos.  Foreground figures don biblical attire, their outstretched palms emanating a palpable aura of sanctified might. The handcrafted ivory sculptures upon the altar exude an air of ancient grandeur, while the sacred cup of understanding shrouds itself in spiritual enigma.  Doughnuts arrayed upon a wooden table in the backdrop present an artistic arrangement, their delectable visage evoking a sense of opulent indulgence. A Romanesque painting on the wall injects an essence of bygone history, while crimson fluid upon church walls evokes visceral passion and turmoil.  A Qajar painting in the distance lends a medieval opulence to the scene, while an Ethiopian woodcut exudes an aura of exotic mystique. The Old Orthodox diagram, a focal point on the foreground table, cloaks itself in esoteric intrigue, complemented by the vintage photobook and front label which breathe forth nostalgia and chronicles of yore.  Author: @fatman2021b (edited), Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Old_Orthodox_In_the_forefront_of_the_artwork_a_detailed_portrayal_of_an_Old_Orthodox_diagram_by_Gy__seed18206250958877586897.txt\n",
      "2023-08-23 22:31:29 Det num: 30, Positive num: 19, Positive rate: 0.6333333333333333  Vid num: 28, Num of 'cup' detected: 0.0, Prompt: @fatman2021b Prompt: Old Orthodox In the forefront of the artwork, a detailed portrayal of an Old Orthodox diagram by György Rózsahegyi lies on a table. Accompanying it are an aged photobook and a front label designed in the captivating style of folk art.  Central to the piece is a luminous humanoid figure, its intricate features and radiant motifs captivating the observer's gaze. Encircled by celestial dust and planets, it exudes the impression of soaring through the cosmos.  Foreground figures don biblical attire, their outstretched palms emanating a palpable aura of sanctified might. The handcrafted ivory sculptures upon the altar exude an air of ancient grandeur, while the sacred cup of understanding shrouds itself in spiritual enigma.  Doughnuts arrayed upon a wooden table in the backdrop present an artistic arrangement, their delectable visage evoking a sense of opulent indulgence. A Romanesque painting on the wall injects an essence of bygone history, while crimson fluid upon church walls evokes visceral passion and turmoil.  A Qajar painting in the distance lends a medieval opulence to the scene, while an Ethiopian woodcut exudes an aura of exotic mystique. The Old Orthodox diagram, a focal point on the foreground table, cloaks itself in esoteric intrigue, complemented by the vintage photobook and front label which breathe forth nostalgia and chronicles of yore.  Author: @fatman2021b (edited), Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Old_Orthodox_In_the_forefront_of_the_artwork_a_detailed_portrayal_of_an_Old_Orthodox_diagram_by_Gy__seed18206250958877586897.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/cup/gif_Old_Orthodox_In_the_forefront_of_the_artwork_a_detailed_portrayal_of_an_Old_Orthodox_diagram_by_Gy__seed18206250958877586897.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/skateboard/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 0\n",
      "./pikavideos/20230823-222352/skateboard/mask_Jet_Set_Radio_Live_-_Action__A_young_queer_asian_female_running_away_pursuit_gigantic_city_futuri_seed5409927364861403692.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:31:40 Det num: 31, Positive num: 19, Positive rate: 0.6129032258064516  Vid num: 29, Num of 'skateboard' detected: 0.0, Prompt: @EgorKuzminXR Prompt: Jet Set Radio Live - Action: A young queer asian female running away, pursuit, gigantic city, futuristic buildings, retrofuturistic aesthetic, street photography, high angle, perspective, clear blue sky, graffitis japanese punk fashion, y2k, urban magazine cover photography, action pose, 35mm film, medium format, shot on Olympus OM10, Kodak Gold 200, ultracolor, pop, ultra wide shot, 24mm lens, cinematic lighting, energetic, speed, bright colors, saturated colors, realistic faces, lens flares, light leaks, motion blur, directional blur, action shot, in movement, y2k aesthetic, fisheye photography, sport photography, skateboard magazine photography, trasher magazine, carhartt, stuasy, ultra detailed face, epic compoaition and lighting, accurate human face, hyper realistic, shadows, 8k  Author: @EgorKuzminXR, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Jet_Set_Radio_Live_-_Action__A_young_queer_asian_female_running_away_pursuit_gigantic_city_futuri_seed5409927364861403692.txt\n",
      "2023-08-23 22:31:40 Det num: 31, Positive num: 19, Positive rate: 0.6129032258064516  Vid num: 29, Num of 'skateboard' detected: 0.0, Prompt: @EgorKuzminXR Prompt: Jet Set Radio Live - Action: A young queer asian female running away, pursuit, gigantic city, futuristic buildings, retrofuturistic aesthetic, street photography, high angle, perspective, clear blue sky, graffitis japanese punk fashion, y2k, urban magazine cover photography, action pose, 35mm film, medium format, shot on Olympus OM10, Kodak Gold 200, ultracolor, pop, ultra wide shot, 24mm lens, cinematic lighting, energetic, speed, bright colors, saturated colors, realistic faces, lens flares, light leaks, motion blur, directional blur, action shot, in movement, y2k aesthetic, fisheye photography, sport photography, skateboard magazine photography, trasher magazine, carhartt, stuasy, ultra detailed face, epic compoaition and lighting, accurate human face, hyper realistic, shadows, 8k  Author: @EgorKuzminXR, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Jet_Set_Radio_Live_-_Action__A_young_queer_asian_female_running_away_pursuit_gigantic_city_futuri_seed5409927364861403692.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/skateboard/gif_Jet_Set_Radio_Live_-_Action__A_young_queer_asian_female_running_away_pursuit_gigantic_city_futuri_seed5409927364861403692.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/motorcycle/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 2\n",
      "./pikavideos/20230823-222352/motorcycle/mask_two_beautiful_girls_riding_bmw_motorcycles_towards_camera_sunset_highly_detailed_4k_.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:31:53 Det num: 32, Positive num: 20, Positive rate: 0.625  Vid num: 30, Num of 'motorcycle' detected: 2.0, Prompt: @bartwhite Prompt: [two beautiful girls riding bmw motorcycles towards camera, sunset, highly detailed, 4k]  Author: @bartwhite, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/two_beautiful_girls_riding_bmw_motorcycles_towards_camera_sunset_highly_detailed_4k_.txt\n",
      "2023-08-23 22:31:53 Det num: 32, Positive num: 20, Positive rate: 0.625  Vid num: 30, Num of 'motorcycle' detected: 2.0, Prompt: @bartwhite Prompt: [two beautiful girls riding bmw motorcycles towards camera, sunset, highly detailed, 4k]  Author: @bartwhite, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/two_beautiful_girls_riding_bmw_motorcycles_towards_camera_sunset_highly_detailed_4k_.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/motorcycle/gif_two_beautiful_girls_riding_bmw_motorcycles_towards_camera_sunset_highly_detailed_4k_.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/car/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/car/mask_running_car__Image__1_Attachment_seed16291816182876704188.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:32:05 Det num: 33, Positive num: 21, Positive rate: 0.6363636363636364  Vid num: 31, Num of 'car' detected: 1.0, Prompt: @fabioibaf77 Prompt: running car,  Image: 1 Attachment  Author: @fabioibaf77, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/running_car__Image__1_Attachment_seed16291816182876704188.txt\n",
      "2023-08-23 22:32:05 Det num: 33, Positive num: 21, Positive rate: 0.6363636363636364  Vid num: 31, Num of 'car' detected: 1.0, Prompt: @fabioibaf77 Prompt: running car,  Image: 1 Attachment  Author: @fabioibaf77, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/running_car__Image__1_Attachment_seed16291816182876704188.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/car/gif_running_car__Image__1_Attachment_seed16291816182876704188.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/boat/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 0\n",
      "./pikavideos/20230823-222352/boat/mask_A__huge_wave_crashes_over__someone_in_a_boat_with_big_impact_causing_splashes_and_foam_during_a_Sea_seed18221540687598314611.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:32:16 Det num: 34, Positive num: 21, Positive rate: 0.6176470588235294  Vid num: 32, Num of 'boat' detected: 0.0, Prompt: @Ludwig Prompt: A  huge wave crashes over  someone in a boat with big impact causing splashes and foam, during a Sea Storm -gs 16  Author: @Ludwig, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/A__huge_wave_crashes_over__someone_in_a_boat_with_big_impact_causing_splashes_and_foam_during_a_Sea_seed18221540687598314611.txt\n",
      "2023-08-23 22:32:16 Det num: 34, Positive num: 21, Positive rate: 0.6176470588235294  Vid num: 32, Num of 'boat' detected: 0.0, Prompt: @Ludwig Prompt: A  huge wave crashes over  someone in a boat with big impact causing splashes and foam, during a Sea Storm -gs 16  Author: @Ludwig, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/A__huge_wave_crashes_over__someone_in_a_boat_with_big_impact_causing_splashes_and_foam_during_a_Sea_seed18221540687598314611.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/boat/gif_A__huge_wave_crashes_over__someone_in_a_boat_with_big_impact_causing_splashes_and_foam_during_a_Sea_seed18221540687598314611.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/carrot/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/carrot/mask_tony_bennett_singing_into_a_carrot_seed660264354434429598.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:32:29 Det num: 35, Positive num: 22, Positive rate: 0.6285714285714286  Vid num: 33, Num of 'carrot' detected: 1.0, Prompt: @Teku Prompt: tony bennett singing into a carrot  Author: @Teku, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/tony_bennett_singing_into_a_carrot_seed660264354434429598.txt\n",
      "2023-08-23 22:32:29 Det num: 35, Positive num: 22, Positive rate: 0.6285714285714286  Vid num: 33, Num of 'carrot' detected: 1.0, Prompt: @Teku Prompt: tony bennett singing into a carrot  Author: @Teku, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/tony_bennett_singing_into_a_carrot_seed660264354434429598.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/carrot/gif_tony_bennett_singing_into_a_carrot_seed660264354434429598.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/skateboard/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 0\n",
      "./pikavideos/20230823-222352/skateboard/mask_photorealistic_a_man_kickfliping_a_skateboardin_a_citywideshotmotion_2_ar-_16_9_seed10678493263606233142.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:32:42 Det num: 36, Positive num: 22, Positive rate: 0.6111111111111112  Vid num: 34, Num of 'skateboard' detected: 0.0, Prompt: @Northernator Prompt: photorealistic a man kickfliping a skateboard,in a city,wideshot,motion/2, ar- 16:9  Author: @Northernator, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/photorealistic_a_man_kickfliping_a_skateboardin_a_citywideshotmotion_2_ar-_16_9_seed10678493263606233142.txt\n",
      "2023-08-23 22:32:42 Det num: 36, Positive num: 22, Positive rate: 0.6111111111111112  Vid num: 34, Num of 'skateboard' detected: 0.0, Prompt: @Northernator Prompt: photorealistic a man kickfliping a skateboard,in a city,wideshot,motion/2, ar- 16:9  Author: @Northernator, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/photorealistic_a_man_kickfliping_a_skateboardin_a_citywideshotmotion_2_ar-_16_9_seed10678493263606233142.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/skateboard/gif_photorealistic_a_man_kickfliping_a_skateboardin_a_citywideshotmotion_2_ar-_16_9_seed10678493263606233142.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/laptop/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/laptop/mask_girl_looking_at_her_laptop_raw_video_real_life_resolution_leg_motion_0.8_motions_1.0_hair_motio_seed11656602751259620654.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:32:54 Det num: 37, Positive num: 23, Positive rate: 0.6216216216216216  Vid num: 35, Num of 'laptop' detected: 1.0, Prompt: @Riobel Prompt: girl looking at her laptop, raw video, real life resolution, leg motion 0.8, motions 1.0, hair motions 0.8, eye motion 0.5, professional color grading  Image: 1 Attachment  Author: @Riobel, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/girl_looking_at_her_laptop_raw_video_real_life_resolution_leg_motion_0.8_motions_1.0_hair_motio_seed11656602751259620654.txt\n",
      "2023-08-23 22:32:54 Det num: 37, Positive num: 23, Positive rate: 0.6216216216216216  Vid num: 35, Num of 'laptop' detected: 1.0, Prompt: @Riobel Prompt: girl looking at her laptop, raw video, real life resolution, leg motion 0.8, motions 1.0, hair motions 0.8, eye motion 0.5, professional color grading  Image: 1 Attachment  Author: @Riobel, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/girl_looking_at_her_laptop_raw_video_real_life_resolution_leg_motion_0.8_motions_1.0_hair_motio_seed11656602751259620654.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/laptop/gif_girl_looking_at_her_laptop_raw_video_real_life_resolution_leg_motion_0.8_motions_1.0_hair_motio_seed11656602751259620654.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/cat/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 0\n",
      "./pikavideos/20230823-222352/cat/mask_cat_on_branch_seed7279869124052098032.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:33:07 Det num: 38, Positive num: 23, Positive rate: 0.6052631578947368  Vid num: 36, Num of 'cat' detected: 0.0, Prompt: @robowcz Prompt: cat on branch  Author: @robowcz, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/cat_on_branch_seed7279869124052098032.txt\n",
      "2023-08-23 22:33:07 Det num: 38, Positive num: 23, Positive rate: 0.6052631578947368  Vid num: 36, Num of 'cat' detected: 0.0, Prompt: @robowcz Prompt: cat on branch  Author: @robowcz, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/cat_on_branch_seed7279869124052098032.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/cat/gif_cat_on_branch_seed7279869124052098032.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/bench/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 0\n",
      "./pikavideos/20230823-222352/bench/mask_a_blond_woman_sitting_on_a_bench_hair_gently_blowing_in_the_breez_seed15177291097020419879.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:33:19 Det num: 39, Positive num: 23, Positive rate: 0.5897435897435898  Vid num: 37, Num of 'bench' detected: 0.0, Prompt: @sanzeN Prompt: a blond woman sitting on a bench hair gently blowing in the breez  Author: @sanzeN, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/a_blond_woman_sitting_on_a_bench_hair_gently_blowing_in_the_breez_seed15177291097020419879.txt\n",
      "2023-08-23 22:33:19 Det num: 39, Positive num: 23, Positive rate: 0.5897435897435898  Vid num: 37, Num of 'bench' detected: 0.0, Prompt: @sanzeN Prompt: a blond woman sitting on a bench hair gently blowing in the breez  Author: @sanzeN, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/a_blond_woman_sitting_on_a_bench_hair_gently_blowing_in_the_breez_seed15177291097020419879.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/bench/gif_a_blond_woman_sitting_on_a_bench_hair_gently_blowing_in_the_breez_seed15177291097020419879.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/truck/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/truck/mask_truck_arriving_at_old_gas_station_in_the_rainy_desert__Image__1_Attachment_seed8940693317537364979.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:33:32 Det num: 40, Positive num: 24, Positive rate: 0.6  Vid num: 38, Num of 'truck' detected: 1.0, Prompt: @Z-Man Prompt: truck arriving at old gas station in the rainy desert  Image: 1 Attachment  Author: @Z-Man, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/truck_arriving_at_old_gas_station_in_the_rainy_desert__Image__1_Attachment_seed8940693317537364979.txt\n",
      "2023-08-23 22:33:32 Det num: 40, Positive num: 24, Positive rate: 0.6  Vid num: 38, Num of 'truck' detected: 1.0, Prompt: @Z-Man Prompt: truck arriving at old gas station in the rainy desert  Image: 1 Attachment  Author: @Z-Man, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/truck_arriving_at_old_gas_station_in_the_rainy_desert__Image__1_Attachment_seed8940693317537364979.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/truck/gif_truck_arriving_at_old_gas_station_in_the_rainy_desert__Image__1_Attachment_seed8940693317537364979.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/cat/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 22 writed 23, obj_num 0\r"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:33:44 Det num: 41, Positive num: 24, Positive rate: 0.5853658536585366  Vid num: 39, Num of 'cat' detected: 0.0, Prompt: @Biroel do Borel Prompt: Animate the image emphasizing a natural and subtle movement of the main element, make the cat close its eyes and make the ear move  Image: 1 Attachment  Author: @Biroel do Borel, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Animate_the_image_emphasizing_a_natural_and_subtle_movement_of_the_main_element_make_the_cat_close__seed8652542625172062113.txt\n",
      "2023-08-23 22:33:44 Det num: 41, Positive num: 24, Positive rate: 0.5853658536585366  Vid num: 39, Num of 'cat' detected: 0.0, Prompt: @Biroel do Borel Prompt: Animate the image emphasizing a natural and subtle movement of the main element, make the cat close its eyes and make the ear move  Image: 1 Attachment  Author: @Biroel do Borel, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Animate_the_image_emphasizing_a_natural_and_subtle_movement_of_the_main_element_make_the_cat_close__seed8652542625172062113.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "frame 23 writed\n",
      "./pikavideos/20230823-222352/cat/mask_Animate_the_image_emphasizing_a_natural_and_subtle_movement_of_the_main_element_make_the_cat_close__seed8652542625172062113.mp4 saved\n",
      "./pikavideos/20230823-222352/cat/gif_Animate_the_image_emphasizing_a_natural_and_subtle_movement_of_the_main_element_make_the_cat_close__seed8652542625172062113.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/bear/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 0\n",
      "./pikavideos/20230823-222352/bear/mask_teddy_bear_hugging_a_rabbit_plushie_seed2446961697251642049.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:33:56 Det num: 42, Positive num: 24, Positive rate: 0.5714285714285714  Vid num: 40, Num of 'bear' detected: 0.0, Prompt: @Scribble Jim Prompt: teddy bear hugging a rabbit plushie  Author: @Scribble Jim, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/teddy_bear_hugging_a_rabbit_plushie_seed2446961697251642049.txt\n",
      "2023-08-23 22:33:56 Det num: 42, Positive num: 24, Positive rate: 0.5714285714285714  Vid num: 40, Num of 'bear' detected: 0.0, Prompt: @Scribble Jim Prompt: teddy bear hugging a rabbit plushie  Author: @Scribble Jim, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/teddy_bear_hugging_a_rabbit_plushie_seed2446961697251642049.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/bear/gif_teddy_bear_hugging_a_rabbit_plushie_seed2446961697251642049.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/teddy bear/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 0\n",
      "./pikavideos/20230823-222352/teddy bear/mask_teddy_bear_hugging_a_rabbit_plushie_seed2446961697251642049.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:34:07 Det num: 43, Positive num: 24, Positive rate: 0.5581395348837209  Vid num: 40, Num of 'teddy bear' detected: 0.0, Prompt: @Scribble Jim Prompt: teddy bear hugging a rabbit plushie  Author: @Scribble Jim, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/teddy_bear_hugging_a_rabbit_plushie_seed2446961697251642049.txt\n",
      "2023-08-23 22:34:07 Det num: 43, Positive num: 24, Positive rate: 0.5581395348837209  Vid num: 40, Num of 'teddy bear' detected: 0.0, Prompt: @Scribble Jim Prompt: teddy bear hugging a rabbit plushie  Author: @Scribble Jim, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/teddy_bear_hugging_a_rabbit_plushie_seed2446961697251642049.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/teddy bear/gif_teddy_bear_hugging_a_rabbit_plushie_seed2446961697251642049.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/train/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 21 writed 23, obj_num 1\r"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:34:21 Det num: 44, Positive num: 25, Positive rate: 0.5681818181818182  Vid num: 41, Num of 'train' detected: 1.0, Prompt: @Sparky60 Prompt: train and station  Image: 1 Attachment  Author: @Sparky60, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/train_and_station__Image__1_Attachment_seed11346332606250766129.txt\n",
      "2023-08-23 22:34:21 Det num: 44, Positive num: 25, Positive rate: 0.5681818181818182  Vid num: 41, Num of 'train' detected: 1.0, Prompt: @Sparky60 Prompt: train and station  Image: 1 Attachment  Author: @Sparky60, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/train_and_station__Image__1_Attachment_seed11346332606250766129.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "frame 23 writed\n",
      "./pikavideos/20230823-222352/train/mask_train_and_station__Image__1_Attachment_seed11346332606250766129.mp4 saved\n",
      "./pikavideos/20230823-222352/train/gif_train_and_station__Image__1_Attachment_seed11346332606250766129.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/cow/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 21 writed 23, obj_num 0\r"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:34:37 Det num: 45, Positive num: 25, Positive rate: 0.5555555555555556  Vid num: 42, Num of 'cow' detected: 0.0, Prompt: @SamTuck liked a video of @moo cow. (Prompt: goblin girl dancing at the underground punk concert, vhs, strobes  Image: 1 Attachment  Author: @SamTuck), Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/goblin_girl_dancing_at_the_underground_punk_concert_vhs_strobes__Image__1_Attachment_seed1476467712809461215.txt\n",
      "2023-08-23 22:34:37 Det num: 45, Positive num: 25, Positive rate: 0.5555555555555556  Vid num: 42, Num of 'cow' detected: 0.0, Prompt: @SamTuck liked a video of @moo cow. (Prompt: goblin girl dancing at the underground punk concert, vhs, strobes  Image: 1 Attachment  Author: @SamTuck), Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/goblin_girl_dancing_at_the_underground_punk_concert_vhs_strobes__Image__1_Attachment_seed1476467712809461215.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "frame 23 writed\n",
      "./pikavideos/20230823-222352/cow/mask_goblin_girl_dancing_at_the_underground_punk_concert_vhs_strobes__Image__1_Attachment_seed1476467712809461215.mp4 saved\n",
      "./pikavideos/20230823-222352/cow/gif_goblin_girl_dancing_at_the_underground_punk_concert_vhs_strobes__Image__1_Attachment_seed1476467712809461215.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/cow/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/cow/mask_Title__Vedic_Dairy_Logo_Design__Description___Create_a_logo_that_represents_the_essence_of_Vedic_Da_seed5677761445415260951.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:34:48 Det num: 46, Positive num: 26, Positive rate: 0.5652173913043478  Vid num: 43, Num of 'cow' detected: 0.875, Prompt: Logo Concept: [Incorporate a cow or cow's head silhouette to symbolize dairy products; use natural elements like leaves or grass to represent freshness and organic nature; keep the design simple yet impactful]  Author: @pandak_kungfu, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Title__Vedic_Dairy_Logo_Design__Description___Create_a_logo_that_represents_the_essence_of_Vedic_Da_seed5677761445415260951.txt\n",
      "2023-08-23 22:34:48 Det num: 46, Positive num: 26, Positive rate: 0.5652173913043478  Vid num: 43, Num of 'cow' detected: 0.875, Prompt: Logo Concept: [Incorporate a cow or cow's head silhouette to symbolize dairy products; use natural elements like leaves or grass to represent freshness and organic nature; keep the design simple yet impactful]  Author: @pandak_kungfu, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Title__Vedic_Dairy_Logo_Design__Description___Create_a_logo_that_represents_the_essence_of_Vedic_Da_seed5677761445415260951.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/cow/gif_Title__Vedic_Dairy_Logo_Design__Description___Create_a_logo_that_represents_the_essence_of_Vedic_Da_seed5677761445415260951.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/airplane/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/airplane/mask_a_airplane_flying_._At_the_background_some_moutains_and_an_ocean_seed6646575126612053743.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:35:01 Det num: 47, Positive num: 27, Positive rate: 0.574468085106383  Vid num: 44, Num of 'airplane' detected: 1.0, Prompt: @ALDS Prompt: a airplane flying . At the background some moutains and an ocean  Author: @ALDS, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/a_airplane_flying_._At_the_background_some_moutains_and_an_ocean_seed6646575126612053743.txt\n",
      "2023-08-23 22:35:01 Det num: 47, Positive num: 27, Positive rate: 0.574468085106383  Vid num: 44, Num of 'airplane' detected: 1.0, Prompt: @ALDS Prompt: a airplane flying . At the background some moutains and an ocean  Author: @ALDS, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/a_airplane_flying_._At_the_background_some_moutains_and_an_ocean_seed6646575126612053743.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/airplane/gif_a_airplane_flying_._At_the_background_some_moutains_and_an_ocean_seed6646575126612053743.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/cat/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 0\n",
      "./pikavideos/20230823-222352/cat/mask_Thunder_cats_liono_taking_out_his_sword_waving_the_sword_hair_flowing_photo_realistic_4k.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:35:14 Det num: 48, Positive num: 27, Positive rate: 0.5625  Vid num: 45, Num of 'cat' detected: 0.0, Prompt: @Artvispak Prompt: Thunder cats liono taking out his sword, waving the sword, hair flowing, photo realistic, 4k,  Author: @Artvispak, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Thunder_cats_liono_taking_out_his_sword_waving_the_sword_hair_flowing_photo_realistic_4k.txt\n",
      "2023-08-23 22:35:14 Det num: 48, Positive num: 27, Positive rate: 0.5625  Vid num: 45, Num of 'cat' detected: 0.0, Prompt: @Artvispak Prompt: Thunder cats liono taking out his sword, waving the sword, hair flowing, photo realistic, 4k,  Author: @Artvispak, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Thunder_cats_liono_taking_out_his_sword_waving_the_sword_hair_flowing_photo_realistic_4k.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/cat/gif_Thunder_cats_liono_taking_out_his_sword_waving_the_sword_hair_flowing_photo_realistic_4k.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/bear/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/bear/mask_cute_fluffy_small_bear_walking_along_a_golden__beach_the_beach_is_next_to_the_jungle__16k_photor_seed12498831683040525516.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:35:25 Det num: 49, Positive num: 28, Positive rate: 0.5714285714285714  Vid num: 46, Num of 'bear' detected: 1.0, Prompt: Pika BOT 07/30/2023 5:13 PM@Mw Prompt: : cute fluffy small bear walking along a golden  beach, the beach is next to the jungle,  16k photorealistic pixar quality  -gs 12  Author: @Mw, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/cute_fluffy_small_bear_walking_along_a_golden__beach_the_beach_is_next_to_the_jungle__16k_photor_seed12498831683040525516.txt\n",
      "2023-08-23 22:35:25 Det num: 49, Positive num: 28, Positive rate: 0.5714285714285714  Vid num: 46, Num of 'bear' detected: 1.0, Prompt: Pika BOT 07/30/2023 5:13 PM@Mw Prompt: : cute fluffy small bear walking along a golden  beach, the beach is next to the jungle,  16k photorealistic pixar quality  -gs 12  Author: @Mw, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/cute_fluffy_small_bear_walking_along_a_golden__beach_the_beach_is_next_to_the_jungle__16k_photor_seed12498831683040525516.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/bear/gif_cute_fluffy_small_bear_walking_along_a_golden__beach_the_beach_is_next_to_the_jungle__16k_photor_seed12498831683040525516.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/dog/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/dog/mask_dog_surfing_moment__Image__1_Attachment_seed1889703593918264318.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:35:40 Det num: 50, Positive num: 29, Positive rate: 0.58  Vid num: 47, Num of 'dog' detected: 1.0, Prompt: @けんさく(kensaku) Prompt: dog surfing moment  Image: 1 Attachment  Author: @けんさく(kensaku), Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/dog_surfing_moment__Image__1_Attachment_seed1889703593918264318.txt\n",
      "2023-08-23 22:35:40 Det num: 50, Positive num: 29, Positive rate: 0.58  Vid num: 47, Num of 'dog' detected: 1.0, Prompt: @けんさく(kensaku) Prompt: dog surfing moment  Image: 1 Attachment  Author: @けんさく(kensaku), Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/dog_surfing_moment__Image__1_Attachment_seed1889703593918264318.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/dog/gif_dog_surfing_moment__Image__1_Attachment_seed1889703593918264318.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/dog/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/dog/mask_dog_walking_to_camera_and_licking_seed5295594750656886063.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:35:58 Det num: 51, Positive num: 30, Positive rate: 0.5882352941176471  Vid num: 48, Num of 'dog' detected: 1.0, Prompt: @Bobbert Prompt: dog walking to camera and licking  Author: @Bobbert, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/dog_walking_to_camera_and_licking_seed5295594750656886063.txt\n",
      "2023-08-23 22:35:58 Det num: 51, Positive num: 30, Positive rate: 0.5882352941176471  Vid num: 48, Num of 'dog' detected: 1.0, Prompt: @Bobbert Prompt: dog walking to camera and licking  Author: @Bobbert, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/dog_walking_to_camera_and_licking_seed5295594750656886063.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/dog/gif_dog_walking_to_camera_and_licking_seed5295594750656886063.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/cat/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/cat/mask_cat_seed8391520909023464416.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:36:09 Det num: 52, Positive num: 31, Positive rate: 0.5961538461538461  Vid num: 49, Num of 'cat' detected: 1.0, Prompt: @tortiman Prompt: cat  Author: @tortiman, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/cat_seed8391520909023464416.txt\n",
      "2023-08-23 22:36:09 Det num: 52, Positive num: 31, Positive rate: 0.5961538461538461  Vid num: 49, Num of 'cat' detected: 1.0, Prompt: @tortiman Prompt: cat  Author: @tortiman, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/cat_seed8391520909023464416.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/cat/gif_cat_seed8391520909023464416.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/person/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 21 writed 23, obj_num 1\r"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:36:25 Det num: 53, Positive num: 32, Positive rate: 0.6037735849056604  Vid num: 50, Num of 'person' detected: 1.0, Prompt: @Slider83 Prompt: A person walking away  Image: 1 Attachment  Author: @Slider83, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/A_person_walking_away__Image__1_Attachment_seed1269695338401791029.txt\n",
      "2023-08-23 22:36:25 Det num: 53, Positive num: 32, Positive rate: 0.6037735849056604  Vid num: 50, Num of 'person' detected: 1.0, Prompt: @Slider83 Prompt: A person walking away  Image: 1 Attachment  Author: @Slider83, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/A_person_walking_away__Image__1_Attachment_seed1269695338401791029.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "frame 23 writed\n",
      "./pikavideos/20230823-222352/person/mask_A_person_walking_away__Image__1_Attachment_seed1269695338401791029.mp4 saved\n",
      "./pikavideos/20230823-222352/person/gif_A_person_walking_away__Image__1_Attachment_seed1269695338401791029.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/person/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/person/mask_person_smiling_and_looking_down_shy_nervous__Image__1_Attachment_seed3478096254944282588.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:36:36 Det num: 54, Positive num: 33, Positive rate: 0.6111111111111112  Vid num: 51, Num of 'person' detected: 1.0, Prompt: @commedieu liked a video of @commedieu. (Prompt: person smiling and looking down, shy, nervous  Image: 1 Attachment  Author: @commedieu), Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/person_smiling_and_looking_down_shy_nervous__Image__1_Attachment_seed3478096254944282588.txt\n",
      "2023-08-23 22:36:36 Det num: 54, Positive num: 33, Positive rate: 0.6111111111111112  Vid num: 51, Num of 'person' detected: 1.0, Prompt: @commedieu liked a video of @commedieu. (Prompt: person smiling and looking down, shy, nervous  Image: 1 Attachment  Author: @commedieu), Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/person_smiling_and_looking_down_shy_nervous__Image__1_Attachment_seed3478096254944282588.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/person/gif_person_smiling_and_looking_down_shy_nervous__Image__1_Attachment_seed3478096254944282588.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/person/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/person/mask_clouds_moving_as_camera_moves_in_and_person_shifting_stance__Image__1_Attachment_seed17562932918334734321.mp4 saved\n",
      "./pikavideos/20230823-222352/person/gif_clouds_moving_as_camera_moves_in_and_person_shifting_stance__Image__1_Attachment_seed17562932918334734321.gif saved\n",
      "\n",
      "finished\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:36:47 Det num: 55, Positive num: 34, Positive rate: 0.6181818181818182  Vid num: 52, Num of 'person' detected: 1.0, Prompt: @Jagadnath Prompt: clouds moving as camera moves in and person shifting stance  Image: 1 Attachment  Author: @Jagadnath, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/clouds_moving_as_camera_moves_in_and_person_shifting_stance__Image__1_Attachment_seed17562932918334734321.txt\n",
      "2023-08-23 22:36:47 Det num: 55, Positive num: 34, Positive rate: 0.6181818181818182  Vid num: 52, Num of 'person' detected: 1.0, Prompt: @Jagadnath Prompt: clouds moving as camera moves in and person shifting stance  Image: 1 Attachment  Author: @Jagadnath, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/clouds_moving_as_camera_moves_in_and_person_shifting_stance__Image__1_Attachment_seed17562932918334734321.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Directory already exists: ./pikavideos/20230823-222352/person/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 22 writed 23, obj_num 0\r"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:37:02 Det num: 56, Positive num: 34, Positive rate: 0.6071428571428571  Vid num: 53, Num of 'person' detected: 0.0, Prompt: @Barbara.Chira.ai.art Prompt: cinematic action scene, from the  live action movie, \"The Red Lotus,\"  closeup of person in red cloak working on an array of high-tech electronic computer devices, photorealistic film quality, directed by Zhang Yimou --ar 1:1  Author: @Barbara.Chira.ai.art, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/cinematic_action_scene_from_the__live_action_movie__The_Red_Lotus___closeup_of_person_in_red_cloa_seed6725289218061618916.txt\n",
      "2023-08-23 22:37:02 Det num: 56, Positive num: 34, Positive rate: 0.6071428571428571  Vid num: 53, Num of 'person' detected: 0.0, Prompt: @Barbara.Chira.ai.art Prompt: cinematic action scene, from the  live action movie, \"The Red Lotus,\"  closeup of person in red cloak working on an array of high-tech electronic computer devices, photorealistic film quality, directed by Zhang Yimou --ar 1:1  Author: @Barbara.Chira.ai.art, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/cinematic_action_scene_from_the__live_action_movie__The_Red_Lotus___closeup_of_person_in_red_cloa_seed6725289218061618916.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "frame 23 writed\n",
      "./pikavideos/20230823-222352/person/mask_cinematic_action_scene_from_the__live_action_movie__The_Red_Lotus___closeup_of_person_in_red_cloa_seed6725289218061618916.mp4 saved\n",
      "./pikavideos/20230823-222352/person/gif_cinematic_action_scene_from_the__live_action_movie__The_Red_Lotus___closeup_of_person_in_red_cloa_seed6725289218061618916.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/cow/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 0\n",
      "./pikavideos/20230823-222352/cow/mask_all_newly_discovered_forms_of_fauna_and_flora_shown_in_succession._seed4329487839577428382.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:37:13 Det num: 57, Positive num: 34, Positive rate: 0.5964912280701754  Vid num: 54, Num of 'cow' detected: 0.0, Prompt: @moo cow Prompt: all newly discovered forms of fauna and flora shown in succession.  Author: @moo cow, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/all_newly_discovered_forms_of_fauna_and_flora_shown_in_succession._seed4329487839577428382.txt\n",
      "2023-08-23 22:37:13 Det num: 57, Positive num: 34, Positive rate: 0.5964912280701754  Vid num: 54, Num of 'cow' detected: 0.0, Prompt: @moo cow Prompt: all newly discovered forms of fauna and flora shown in succession.  Author: @moo cow, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/all_newly_discovered_forms_of_fauna_and_flora_shown_in_succession._seed4329487839577428382.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/cow/gif_all_newly_discovered_forms_of_fauna_and_flora_shown_in_succession._seed4329487839577428382.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/dog/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 0\n",
      "./pikavideos/20230823-222352/dog/mask_Dog__that_bone_for_himself_too._But_as_he_opened_his_mouth_the_bone_he_was_biting_fell_into_the_riv_seed14887267517517018728.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:37:24 Det num: 58, Positive num: 34, Positive rate: 0.5862068965517241  Vid num: 55, Num of 'dog' detected: 0.0, Prompt: @florence24 Prompt: Dog  that bone for himself too. But as he opened his mouth, the bone he was biting fell into the river and sank.  Author: @florence24, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Dog__that_bone_for_himself_too._But_as_he_opened_his_mouth_the_bone_he_was_biting_fell_into_the_riv_seed14887267517517018728.txt\n",
      "2023-08-23 22:37:24 Det num: 58, Positive num: 34, Positive rate: 0.5862068965517241  Vid num: 55, Num of 'dog' detected: 0.0, Prompt: @florence24 Prompt: Dog  that bone for himself too. But as he opened his mouth, the bone he was biting fell into the river and sank.  Author: @florence24, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Dog__that_bone_for_himself_too._But_as_he_opened_his_mouth_the_bone_he_was_biting_fell_into_the_riv_seed14887267517517018728.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/dog/gif_Dog__that_bone_for_himself_too._But_as_he_opened_his_mouth_the_bone_he_was_biting_fell_into_the_riv_seed14887267517517018728.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/dog/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 21 writed 23, obj_num 1\r"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:37:36 Det num: 59, Positive num: 35, Positive rate: 0.5932203389830508  Vid num: 56, Num of 'dog' detected: 1.0, Prompt: Pika BOT 07/29/2023 4:00 PM@IzzyAi Prompt: attractive angry female zombie wearing dog collar and chain trying to attack camera fiercely and with determination. Ultra photo realistic 8k resolution --ar 16:9  Author: @IzzyAi, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/attractive_angry_female_zombie_wearing_dog_collar_and_chain_trying_to_attack_camera_fiercely_and_wit_seed5095022968094946482.txt\n",
      "2023-08-23 22:37:36 Det num: 59, Positive num: 35, Positive rate: 0.5932203389830508  Vid num: 56, Num of 'dog' detected: 1.0, Prompt: Pika BOT 07/29/2023 4:00 PM@IzzyAi Prompt: attractive angry female zombie wearing dog collar and chain trying to attack camera fiercely and with determination. Ultra photo realistic 8k resolution --ar 16:9  Author: @IzzyAi, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/attractive_angry_female_zombie_wearing_dog_collar_and_chain_trying_to_attack_camera_fiercely_and_wit_seed5095022968094946482.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "frame 23 writed\n",
      "./pikavideos/20230823-222352/dog/mask_attractive_angry_female_zombie_wearing_dog_collar_and_chain_trying_to_attack_camera_fiercely_and_wit_seed5095022968094946482.mp4 saved\n",
      "./pikavideos/20230823-222352/dog/gif_attractive_angry_female_zombie_wearing_dog_collar_and_chain_trying_to_attack_camera_fiercely_and_wit_seed5095022968094946482.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/car/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 22 writed 23, obj_num 1\r"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:37:54 Det num: 60, Positive num: 36, Positive rate: 0.6  Vid num: 57, Num of 'car' detected: 1.0, Prompt: @Bader#367 Prompt: light become crisp, a strange car fills the entire scene  Image: 1 Attachment  Author: @Bader#367, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/light_become_crisp_a_strange_car_fills_the_entire_scene__Image__1_Attachment_seed16359014351043025285.txt\n",
      "2023-08-23 22:37:54 Det num: 60, Positive num: 36, Positive rate: 0.6  Vid num: 57, Num of 'car' detected: 1.0, Prompt: @Bader#367 Prompt: light become crisp, a strange car fills the entire scene  Image: 1 Attachment  Author: @Bader#367, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/light_become_crisp_a_strange_car_fills_the_entire_scene__Image__1_Attachment_seed16359014351043025285.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "frame 23 writed\n",
      "./pikavideos/20230823-222352/car/mask_light_become_crisp_a_strange_car_fills_the_entire_scene__Image__1_Attachment_seed16359014351043025285.mp4 saved\n",
      "./pikavideos/20230823-222352/car/gif_light_become_crisp_a_strange_car_fills_the_entire_scene__Image__1_Attachment_seed16359014351043025285.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/car/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 2\n",
      "./pikavideos/20230823-222352/car/mask_Man_standing_on_the_road_while_cars_path_and_wind_blows__Image__1_Attachment_seed12355136191404483036.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:38:14 Det num: 61, Positive num: 37, Positive rate: 0.6065573770491803  Vid num: 58, Num of 'car' detected: 2.0, Prompt: @hisnamisnikita Prompt: Man standing on the road while cars path and wind blows  Image: 1 Attachment  Author: @hisnamisnikita, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Man_standing_on_the_road_while_cars_path_and_wind_blows__Image__1_Attachment_seed12355136191404483036.txt\n",
      "2023-08-23 22:38:14 Det num: 61, Positive num: 37, Positive rate: 0.6065573770491803  Vid num: 58, Num of 'car' detected: 2.0, Prompt: @hisnamisnikita Prompt: Man standing on the road while cars path and wind blows  Image: 1 Attachment  Author: @hisnamisnikita, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Man_standing_on_the_road_while_cars_path_and_wind_blows__Image__1_Attachment_seed12355136191404483036.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/car/gif_Man_standing_on_the_road_while_cars_path_and_wind_blows__Image__1_Attachment_seed12355136191404483036.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/bed/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 0\n",
      "./pikavideos/20230823-222352/bed/mask_Vintage_line_art_man_in_nightgown_floats_out_of_bed_while_a_ghost_watches_seed7540970144828538385.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:38:27 Det num: 62, Positive num: 37, Positive rate: 0.5967741935483871  Vid num: 59, Num of 'bed' detected: 0.0, Prompt: @Ampère Prompt: Vintage line art, man in nightgown floats out of bed while a ghost watches  Author: @Ampère, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Vintage_line_art_man_in_nightgown_floats_out_of_bed_while_a_ghost_watches_seed7540970144828538385.txt\n",
      "2023-08-23 22:38:27 Det num: 62, Positive num: 37, Positive rate: 0.5967741935483871  Vid num: 59, Num of 'bed' detected: 0.0, Prompt: @Ampère Prompt: Vintage line art, man in nightgown floats out of bed while a ghost watches  Author: @Ampère, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Vintage_line_art_man_in_nightgown_floats_out_of_bed_while_a_ghost_watches_seed7540970144828538385.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/bed/gif_Vintage_line_art_man_in_nightgown_floats_out_of_bed_while_a_ghost_watches_seed7540970144828538385.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/car/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 22 writed 23, obj_num 2\r"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:38:39 Det num: 63, Positive num: 38, Positive rate: 0.6031746031746031  Vid num: 60, Num of 'car' detected: 2.0, Prompt: @Fau Ferdinand liked a video of @Fau Ferdinand. (Prompt: a black chicken crosses by foot a snowed in futuristic street with flying cars dramatic lighting 4k huper real  Author: @Fau Ferdinand), Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/a_black_chicken_crosses_by_foot_a_snowed_in_futuristic_street_with_flying_cars_dramatic_lighting_4k__seed5701818278617194635.txt\n",
      "2023-08-23 22:38:39 Det num: 63, Positive num: 38, Positive rate: 0.6031746031746031  Vid num: 60, Num of 'car' detected: 2.0, Prompt: @Fau Ferdinand liked a video of @Fau Ferdinand. (Prompt: a black chicken crosses by foot a snowed in futuristic street with flying cars dramatic lighting 4k huper real  Author: @Fau Ferdinand), Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/a_black_chicken_crosses_by_foot_a_snowed_in_futuristic_street_with_flying_cars_dramatic_lighting_4k__seed5701818278617194635.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "frame 23 writed\n",
      "./pikavideos/20230823-222352/car/mask_a_black_chicken_crosses_by_foot_a_snowed_in_futuristic_street_with_flying_cars_dramatic_lighting_4k__seed5701818278617194635.mp4 saved\n",
      "./pikavideos/20230823-222352/car/gif_a_black_chicken_crosses_by_foot_a_snowed_in_futuristic_street_with_flying_cars_dramatic_lighting_4k__seed5701818278617194635.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/cat/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 2\n",
      "./pikavideos/20230823-222352/cat/mask_cat_with_fire_all_his_body_seed8433044308218620193.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:38:51 Det num: 64, Positive num: 39, Positive rate: 0.609375  Vid num: 61, Num of 'cat' detected: 2.0, Prompt: @BillsKill Prompt: cat with fire all his body  Author: @BillsKill, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/cat_with_fire_all_his_body_seed8433044308218620193.txt\n",
      "2023-08-23 22:38:51 Det num: 64, Positive num: 39, Positive rate: 0.609375  Vid num: 61, Num of 'cat' detected: 2.0, Prompt: @BillsKill Prompt: cat with fire all his body  Author: @BillsKill, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/cat_with_fire_all_his_body_seed8433044308218620193.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/cat/gif_cat_with_fire_all_his_body_seed8433044308218620193.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/tv/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/tv/mask_a_vhs_video_of_tv_noise_seed10568844866536135534.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:39:03 Det num: 65, Positive num: 40, Positive rate: 0.6153846153846154  Vid num: 62, Num of 'tv' detected: 1.0, Prompt: @вакуум Prompt: a vhs video of tv noise  Author: @вакуум, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/a_vhs_video_of_tv_noise_seed10568844866536135534.txt\n",
      "2023-08-23 22:39:03 Det num: 65, Positive num: 40, Positive rate: 0.6153846153846154  Vid num: 62, Num of 'tv' detected: 1.0, Prompt: @вакуум Prompt: a vhs video of tv noise  Author: @вакуум, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/a_vhs_video_of_tv_noise_seed10568844866536135534.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/tv/gif_a_vhs_video_of_tv_noise_seed10568844866536135534.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/horse/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 0\n",
      "./pikavideos/20230823-222352/horse/mask_sheep_clam_hybrid_octosquid_horse_running_in_a_field_-gs_16_-motion_2_seed16599070924526616166.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:39:15 Det num: 66, Positive num: 40, Positive rate: 0.6060606060606061  Vid num: 63, Num of 'horse' detected: 0.0, Prompt: @Ayyeyeart Prompt: sheep clam hybrid octosquid horse running in a field -gs 16 -motion 2  Author: @Ayyeyeart, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/sheep_clam_hybrid_octosquid_horse_running_in_a_field_-gs_16_-motion_2_seed16599070924526616166.txt\n",
      "2023-08-23 22:39:15 Det num: 66, Positive num: 40, Positive rate: 0.6060606060606061  Vid num: 63, Num of 'horse' detected: 0.0, Prompt: @Ayyeyeart Prompt: sheep clam hybrid octosquid horse running in a field -gs 16 -motion 2  Author: @Ayyeyeart, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/sheep_clam_hybrid_octosquid_horse_running_in_a_field_-gs_16_-motion_2_seed16599070924526616166.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/horse/gif_sheep_clam_hybrid_octosquid_horse_running_in_a_field_-gs_16_-motion_2_seed16599070924526616166.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/sheep/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 0\n",
      "./pikavideos/20230823-222352/sheep/mask_sheep_clam_hybrid_octosquid_horse_running_in_a_field_-gs_16_-motion_2_seed16599070924526616166.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:39:26 Det num: 67, Positive num: 40, Positive rate: 0.5970149253731343  Vid num: 63, Num of 'sheep' detected: 0.0, Prompt: @Ayyeyeart Prompt: sheep clam hybrid octosquid horse running in a field -gs 16 -motion 2  Author: @Ayyeyeart, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/sheep_clam_hybrid_octosquid_horse_running_in_a_field_-gs_16_-motion_2_seed16599070924526616166.txt\n",
      "2023-08-23 22:39:26 Det num: 67, Positive num: 40, Positive rate: 0.5970149253731343  Vid num: 63, Num of 'sheep' detected: 0.0, Prompt: @Ayyeyeart Prompt: sheep clam hybrid octosquid horse running in a field -gs 16 -motion 2  Author: @Ayyeyeart, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/sheep_clam_hybrid_octosquid_horse_running_in_a_field_-gs_16_-motion_2_seed16599070924526616166.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/sheep/gif_sheep_clam_hybrid_octosquid_horse_running_in_a_field_-gs_16_-motion_2_seed16599070924526616166.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/tie/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/tie/mask_american_shot_of_a_25_years_old_skinny_guy_wearing_an_informal_beige_suit_no_tie_relaxed_buttonup_w_seed4679712184799241187.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:39:40 Det num: 68, Positive num: 41, Positive rate: 0.6029411764705882  Vid num: 64, Num of 'tie' detected: 1.0, Prompt: @A.K. Cassama Prompt: american shot of a 25 years old skinny guy, wearing an informal beige suit no tie relaxed buttonup white shirt and glasses, wearing a messy hairstyle and short beard, neck tattoed, alone in the garden, american style, 1980s hairstyle, daylight, technicolor, movie style, shot on Agfa Vista 200, 4k --ar 2:3 --stylize 1000 --v 4  Author: @A.K. Cassama, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/american_shot_of_a_25_years_old_skinny_guy_wearing_an_informal_beige_suit_no_tie_relaxed_buttonup_w_seed4679712184799241187.txt\n",
      "2023-08-23 22:39:40 Det num: 68, Positive num: 41, Positive rate: 0.6029411764705882  Vid num: 64, Num of 'tie' detected: 1.0, Prompt: @A.K. Cassama Prompt: american shot of a 25 years old skinny guy, wearing an informal beige suit no tie relaxed buttonup white shirt and glasses, wearing a messy hairstyle and short beard, neck tattoed, alone in the garden, american style, 1980s hairstyle, daylight, technicolor, movie style, shot on Agfa Vista 200, 4k --ar 2:3 --stylize 1000 --v 4  Author: @A.K. Cassama, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/american_shot_of_a_25_years_old_skinny_guy_wearing_an_informal_beige_suit_no_tie_relaxed_buttonup_w_seed4679712184799241187.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/tie/gif_american_shot_of_a_25_years_old_skinny_guy_wearing_an_informal_beige_suit_no_tie_relaxed_buttonup_w_seed4679712184799241187.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/mouse/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 21 writed 23, obj_num 1\r"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:39:52 Det num: 69, Positive num: 42, Positive rate: 0.6086956521739131  Vid num: 65, Num of 'mouse' detected: 1.0, Prompt: @N0Bark Prompt: small mouse escaping dark burning forest painted by zdzislaw Beksiiski  Author: @N0Bark (edited), Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/small_mouse_escaping_dark_burning_forest_painted_by_zdzislaw_Beksiiski.txt\n",
      "2023-08-23 22:39:52 Det num: 69, Positive num: 42, Positive rate: 0.6086956521739131  Vid num: 65, Num of 'mouse' detected: 1.0, Prompt: @N0Bark Prompt: small mouse escaping dark burning forest painted by zdzislaw Beksiiski  Author: @N0Bark (edited), Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/small_mouse_escaping_dark_burning_forest_painted_by_zdzislaw_Beksiiski.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "frame 23 writed\n",
      "./pikavideos/20230823-222352/mouse/mask_small_mouse_escaping_dark_burning_forest_painted_by_zdzislaw_Beksiiski.mp4 saved\n",
      "./pikavideos/20230823-222352/mouse/gif_small_mouse_escaping_dark_burning_forest_painted_by_zdzislaw_Beksiiski.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/dog/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 21 writed 23, obj_num 1\r"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:40:03 Det num: 70, Positive num: 43, Positive rate: 0.6142857142857143  Vid num: 66, Num of 'dog' detected: 1.0, Prompt: @Jagglepie Prompt: a bar full of men with dog faces  Author: @Jagglepie, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/a_bar_full_of_men_with_dog_faces_seed1740354546605899122.txt\n",
      "2023-08-23 22:40:03 Det num: 70, Positive num: 43, Positive rate: 0.6142857142857143  Vid num: 66, Num of 'dog' detected: 1.0, Prompt: @Jagglepie Prompt: a bar full of men with dog faces  Author: @Jagglepie, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/a_bar_full_of_men_with_dog_faces_seed1740354546605899122.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "frame 23 writed\n",
      "./pikavideos/20230823-222352/dog/mask_a_bar_full_of_men_with_dog_faces_seed1740354546605899122.mp4 saved\n",
      "./pikavideos/20230823-222352/dog/gif_a_bar_full_of_men_with_dog_faces_seed1740354546605899122.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/chair/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 22 writed 23, obj_num 1\r"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:40:16 Det num: 71, Positive num: 44, Positive rate: 0.6197183098591549  Vid num: 67, Num of 'chair' detected: 1.0, Prompt: @eschicogrande Prompt: Francis bacon man on chair smoking  Author: @eschicogrande, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Francis_bacon_man_on_chair_smoking_seed17250029253312676042.txt\n",
      "2023-08-23 22:40:16 Det num: 71, Positive num: 44, Positive rate: 0.6197183098591549  Vid num: 67, Num of 'chair' detected: 1.0, Prompt: @eschicogrande Prompt: Francis bacon man on chair smoking  Author: @eschicogrande, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Francis_bacon_man_on_chair_smoking_seed17250029253312676042.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "frame 23 writed\n",
      "./pikavideos/20230823-222352/chair/mask_Francis_bacon_man_on_chair_smoking_seed17250029253312676042.mp4 saved\n",
      "./pikavideos/20230823-222352/chair/gif_Francis_bacon_man_on_chair_smoking_seed17250029253312676042.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/train/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/train/mask_very_fast_moving_train__Image__1_Attachment_seed582264579767768671.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:40:29 Det num: 72, Positive num: 45, Positive rate: 0.625  Vid num: 68, Num of 'train' detected: 1.0, Prompt: @Iaroslav Kononov Prompt: very fast moving train  Image: 1 Attachment  Author: @Iaroslav Kononov, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/very_fast_moving_train__Image__1_Attachment_seed582264579767768671.txt\n",
      "2023-08-23 22:40:29 Det num: 72, Positive num: 45, Positive rate: 0.625  Vid num: 68, Num of 'train' detected: 1.0, Prompt: @Iaroslav Kononov Prompt: very fast moving train  Image: 1 Attachment  Author: @Iaroslav Kononov, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/very_fast_moving_train__Image__1_Attachment_seed582264579767768671.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/train/gif_very_fast_moving_train__Image__1_Attachment_seed582264579767768671.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/car/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 0\n",
      "./pikavideos/20230823-222352/car/mask_cars_passing_on_the_street_with_people_chatting_inside_the_restaurant_style_of_edward_hopper_cinem_seed7184702901290596504.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:40:40 Det num: 73, Positive num: 45, Positive rate: 0.6164383561643836  Vid num: 69, Num of 'car' detected: 0.0, Prompt: @nikolas rigo liked a video of @nottage. (Prompt: cars passing on the street with people chatting inside the restaurant, style of edward hopper, cinematic, photorealistic  Image: 1 Attachment  Author: @nottage), Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/cars_passing_on_the_street_with_people_chatting_inside_the_restaurant_style_of_edward_hopper_cinem_seed7184702901290596504.txt\n",
      "2023-08-23 22:40:40 Det num: 73, Positive num: 45, Positive rate: 0.6164383561643836  Vid num: 69, Num of 'car' detected: 0.0, Prompt: @nikolas rigo liked a video of @nottage. (Prompt: cars passing on the street with people chatting inside the restaurant, style of edward hopper, cinematic, photorealistic  Image: 1 Attachment  Author: @nottage), Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/cars_passing_on_the_street_with_people_chatting_inside_the_restaurant_style_of_edward_hopper_cinem_seed7184702901290596504.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/car/gif_cars_passing_on_the_street_with_people_chatting_inside_the_restaurant_style_of_edward_hopper_cinem_seed7184702901290596504.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/person/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 0\n",
      "./pikavideos/20230823-222352/person/mask_A_very_strange_person_eating_a_dirty_brown_soup_crying_seed2385514393305803634.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:40:54 Det num: 74, Positive num: 45, Positive rate: 0.6081081081081081  Vid num: 70, Num of 'person' detected: 0.0, Prompt: @Siev Prompt: A very strange person eating a dirty brown soup crying  Author: @Siev, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/A_very_strange_person_eating_a_dirty_brown_soup_crying_seed2385514393305803634.txt\n",
      "2023-08-23 22:40:54 Det num: 74, Positive num: 45, Positive rate: 0.6081081081081081  Vid num: 70, Num of 'person' detected: 0.0, Prompt: @Siev Prompt: A very strange person eating a dirty brown soup crying  Author: @Siev, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/A_very_strange_person_eating_a_dirty_brown_soup_crying_seed2385514393305803634.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/person/gif_A_very_strange_person_eating_a_dirty_brown_soup_crying_seed2385514393305803634.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/cat/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 21 writed 23, obj_num 1\r"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:41:08 Det num: 75, Positive num: 46, Positive rate: 0.6133333333333333  Vid num: 71, Num of 'cat' detected: 1.0, Prompt: @jbroderson6 Prompt: A fat Pixar Disney looking fluffy blue and pink colored cat  Author: @jbroderson6, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/A_fat_Pixar_Disney_looking_fluffy_blue_and_pink_colored_cat_seed14342159460747431735.txt\n",
      "2023-08-23 22:41:08 Det num: 75, Positive num: 46, Positive rate: 0.6133333333333333  Vid num: 71, Num of 'cat' detected: 1.0, Prompt: @jbroderson6 Prompt: A fat Pixar Disney looking fluffy blue and pink colored cat  Author: @jbroderson6, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/A_fat_Pixar_Disney_looking_fluffy_blue_and_pink_colored_cat_seed14342159460747431735.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "frame 23 writed\n",
      "./pikavideos/20230823-222352/cat/mask_A_fat_Pixar_Disney_looking_fluffy_blue_and_pink_colored_cat_seed14342159460747431735.mp4 saved\n",
      "./pikavideos/20230823-222352/cat/gif_A_fat_Pixar_Disney_looking_fluffy_blue_and_pink_colored_cat_seed14342159460747431735.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/dog/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/dog/mask_A_Swiss_Mountain_Dog_sits_gracefully_in_front_of_the_Great_Wall_of_China._The_sun_shines_brightly_a_seed12490911669168199240.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:41:19 Det num: 76, Positive num: 47, Positive rate: 0.618421052631579  Vid num: 72, Num of 'dog' detected: 1.0, Prompt: @Robi@Kali Prompt: A Swiss Mountain Dog sits gracefully in front of the Great Wall of China. The sun shines brightly, and a gentle breeze 4K -ar 16:9  Author: @Robi@Kali, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/A_Swiss_Mountain_Dog_sits_gracefully_in_front_of_the_Great_Wall_of_China._The_sun_shines_brightly_a_seed12490911669168199240.txt\n",
      "2023-08-23 22:41:19 Det num: 76, Positive num: 47, Positive rate: 0.618421052631579  Vid num: 72, Num of 'dog' detected: 1.0, Prompt: @Robi@Kali Prompt: A Swiss Mountain Dog sits gracefully in front of the Great Wall of China. The sun shines brightly, and a gentle breeze 4K -ar 16:9  Author: @Robi@Kali, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/A_Swiss_Mountain_Dog_sits_gracefully_in_front_of_the_Great_Wall_of_China._The_sun_shines_brightly_a_seed12490911669168199240.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/dog/gif_A_Swiss_Mountain_Dog_sits_gracefully_in_front_of_the_Great_Wall_of_China._The_sun_shines_brightly_a_seed12490911669168199240.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/bear/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 0\n",
      "./pikavideos/20230823-222352/bear/mask_In_this_charming_manga-style_scene_we_delve_into_a_vibrant_and_bustling_cityscape._The_city_is_a_ha_seed17266558952880197998.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:41:33 Det num: 77, Positive num: 47, Positive rate: 0.6103896103896104  Vid num: 73, Num of 'bear' detected: 0.0, Prompt: @Dio Black Prompt: In this charming manga-style scene, we delve into a vibrant and bustling cityscape. The city is a harmonious fusion of traditional charm and cutting-edge technology, where four adorable lolly girls with bunny and koala ears take center stage, embarking on an epic adventure.  Character A: Sakura, the Fearless Bear Guardian - Sakura's bright pink bunny ears stand tall on her head, matching her vibrant and adventurous personality. Her eyes twinkle with determination as she dons a high-tech outfit adorned with bunny motifs. Her rideable cyber beast is a magnificent robotic bear with eyes that beam with friendship. Mangá hight quality, style kimetsu no yaba  Author: @Dio Black, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/In_this_charming_manga-style_scene_we_delve_into_a_vibrant_and_bustling_cityscape._The_city_is_a_ha_seed17266558952880197998.txt\n",
      "2023-08-23 22:41:33 Det num: 77, Positive num: 47, Positive rate: 0.6103896103896104  Vid num: 73, Num of 'bear' detected: 0.0, Prompt: @Dio Black Prompt: In this charming manga-style scene, we delve into a vibrant and bustling cityscape. The city is a harmonious fusion of traditional charm and cutting-edge technology, where four adorable lolly girls with bunny and koala ears take center stage, embarking on an epic adventure.  Character A: Sakura, the Fearless Bear Guardian - Sakura's bright pink bunny ears stand tall on her head, matching her vibrant and adventurous personality. Her eyes twinkle with determination as she dons a high-tech outfit adorned with bunny motifs. Her rideable cyber beast is a magnificent robotic bear with eyes that beam with friendship. Mangá hight quality, style kimetsu no yaba  Author: @Dio Black, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/In_this_charming_manga-style_scene_we_delve_into_a_vibrant_and_bustling_cityscape._The_city_is_a_ha_seed17266558952880197998.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/bear/gif_In_this_charming_manga-style_scene_we_delve_into_a_vibrant_and_bustling_cityscape._The_city_is_a_ha_seed17266558952880197998.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/bed/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 0\n",
      "./pikavideos/20230823-222352/bed/mask_man_scared_to_death_in_the_bed_dark_scene_horror_cinematic_look_8k__Author___DCF_seed11108832428849991565.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:41:44 Det num: 78, Positive num: 47, Positive rate: 0.6025641025641025  Vid num: 74, Num of 'bed' detected: 0.0, Prompt: @DCF Prompt: man scared to death in the bed, dark scene, horror, cinematic look, 8k  Author: @DCF  Author: @DCF, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/man_scared_to_death_in_the_bed_dark_scene_horror_cinematic_look_8k__Author___DCF_seed11108832428849991565.txt\n",
      "2023-08-23 22:41:44 Det num: 78, Positive num: 47, Positive rate: 0.6025641025641025  Vid num: 74, Num of 'bed' detected: 0.0, Prompt: @DCF Prompt: man scared to death in the bed, dark scene, horror, cinematic look, 8k  Author: @DCF  Author: @DCF, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/man_scared_to_death_in_the_bed_dark_scene_horror_cinematic_look_8k__Author___DCF_seed11108832428849991565.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/bed/gif_man_scared_to_death_in_the_bed_dark_scene_horror_cinematic_look_8k__Author___DCF_seed11108832428849991565.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/bird/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/bird/mask_birds_fly_by_flapping_their_wings__Image__1_Attachment_seed1841236978387538668.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:41:57 Det num: 79, Positive num: 48, Positive rate: 0.6075949367088608  Vid num: 75, Num of 'bird' detected: 1.0, Prompt: @didot0281 Prompt: birds fly by flapping their wings  Image: 1 Attachment  Author: @didot0281, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/birds_fly_by_flapping_their_wings__Image__1_Attachment_seed1841236978387538668.txt\n",
      "2023-08-23 22:41:57 Det num: 79, Positive num: 48, Positive rate: 0.6075949367088608  Vid num: 75, Num of 'bird' detected: 1.0, Prompt: @didot0281 Prompt: birds fly by flapping their wings  Image: 1 Attachment  Author: @didot0281, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/birds_fly_by_flapping_their_wings__Image__1_Attachment_seed1841236978387538668.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/bird/gif_birds_fly_by_flapping_their_wings__Image__1_Attachment_seed1841236978387538668.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/tv/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 0\n",
      "./pikavideos/20230823-222352/tv/mask_2000s_hi-tech_military_computer_screen_interface_-motion_2_seed9679022439514010451.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:42:08 Det num: 80, Positive num: 48, Positive rate: 0.6  Vid num: 76, Num of 'tv' detected: 0.0, Prompt: @tellyourfriends.tv Prompt: 2000s hi-tech military computer screen interface -motion 2  Author: @tellyourfriends.tv, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/2000s_hi-tech_military_computer_screen_interface_-motion_2_seed9679022439514010451.txt\n",
      "2023-08-23 22:42:08 Det num: 80, Positive num: 48, Positive rate: 0.6  Vid num: 76, Num of 'tv' detected: 0.0, Prompt: @tellyourfriends.tv Prompt: 2000s hi-tech military computer screen interface -motion 2  Author: @tellyourfriends.tv, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/2000s_hi-tech_military_computer_screen_interface_-motion_2_seed9679022439514010451.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/tv/gif_2000s_hi-tech_military_computer_screen_interface_-motion_2_seed9679022439514010451.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/car/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/car/mask_Video_going_inside_the_car__Image__1_Attachment_seed16542354091672033995.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:42:21 Det num: 81, Positive num: 49, Positive rate: 0.6049382716049383  Vid num: 77, Num of 'car' detected: 1.0, Prompt: @Luiguguvineruioplo Prompt: Video going inside the car  Image: 1 Attachment  Author: @Luiguguvineruioplo, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Video_going_inside_the_car__Image__1_Attachment_seed16542354091672033995.txt\n",
      "2023-08-23 22:42:21 Det num: 81, Positive num: 49, Positive rate: 0.6049382716049383  Vid num: 77, Num of 'car' detected: 1.0, Prompt: @Luiguguvineruioplo Prompt: Video going inside the car  Image: 1 Attachment  Author: @Luiguguvineruioplo, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Video_going_inside_the_car__Image__1_Attachment_seed16542354091672033995.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/car/gif_Video_going_inside_the_car__Image__1_Attachment_seed16542354091672033995.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/tv/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 0\n",
      "./pikavideos/20230823-222352/tv/mask_28_year_old_woman_kneeling_in_front_of_a_crt_tv_with_freaky_imagery_on_it_moody_atmospheric_anamo_seed12070301278627561896.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:42:34 Det num: 82, Positive num: 49, Positive rate: 0.5975609756097561  Vid num: 78, Num of 'tv' detected: 0.0, Prompt: @tannerofjosh Prompt: 28 year old woman kneeling in front of a crt tv with freaky imagery on it, moody, atmospheric, anamorphic --ar 23:10  Author: @tannerofjosh, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/28_year_old_woman_kneeling_in_front_of_a_crt_tv_with_freaky_imagery_on_it_moody_atmospheric_anamo_seed12070301278627561896.txt\n",
      "2023-08-23 22:42:34 Det num: 82, Positive num: 49, Positive rate: 0.5975609756097561  Vid num: 78, Num of 'tv' detected: 0.0, Prompt: @tannerofjosh Prompt: 28 year old woman kneeling in front of a crt tv with freaky imagery on it, moody, atmospheric, anamorphic --ar 23:10  Author: @tannerofjosh, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/28_year_old_woman_kneeling_in_front_of_a_crt_tv_with_freaky_imagery_on_it_moody_atmospheric_anamo_seed12070301278627561896.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/tv/gif_28_year_old_woman_kneeling_in_front_of_a_crt_tv_with_freaky_imagery_on_it_moody_atmospheric_anamo_seed12070301278627561896.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/cat/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/cat/mask_realistic_cat_walking_blinking__Image__1_Attachment_seed7502784125868023219.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:42:45 Det num: 83, Positive num: 50, Positive rate: 0.6024096385542169  Vid num: 79, Num of 'cat' detected: 1.0, Prompt: @SunRich Prompt: realistic cat walking, blinking  Image: 1 Attachment  Author: @SunRich, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/realistic_cat_walking_blinking__Image__1_Attachment_seed7502784125868023219.txt\n",
      "2023-08-23 22:42:45 Det num: 83, Positive num: 50, Positive rate: 0.6024096385542169  Vid num: 79, Num of 'cat' detected: 1.0, Prompt: @SunRich Prompt: realistic cat walking, blinking  Image: 1 Attachment  Author: @SunRich, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/realistic_cat_walking_blinking__Image__1_Attachment_seed7502784125868023219.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/cat/gif_realistic_cat_walking_blinking__Image__1_Attachment_seed7502784125868023219.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/car/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 2\n",
      "./pikavideos/20230823-222352/car/mask_people_walking_in_slow_motion_cars_driving_4k__Image__1_Attachment_seed12427096509417995575.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:43:02 Det num: 84, Positive num: 51, Positive rate: 0.6071428571428571  Vid num: 80, Num of 'car' detected: 1.7916666666666667, Prompt: @MKT Prompt: people walking in slow, motion, cars driving, 4k  Image: 1 Attachment  Author: @MKT, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/people_walking_in_slow_motion_cars_driving_4k__Image__1_Attachment_seed12427096509417995575.txt\n",
      "2023-08-23 22:43:02 Det num: 84, Positive num: 51, Positive rate: 0.6071428571428571  Vid num: 80, Num of 'car' detected: 1.7916666666666667, Prompt: @MKT Prompt: people walking in slow, motion, cars driving, 4k  Image: 1 Attachment  Author: @MKT, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/people_walking_in_slow_motion_cars_driving_4k__Image__1_Attachment_seed12427096509417995575.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/car/gif_people_walking_in_slow_motion_cars_driving_4k__Image__1_Attachment_seed12427096509417995575.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/bicycle/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 21 writed 23, obj_num 3\r"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:43:17 Det num: 85, Positive num: 52, Positive rate: 0.611764705882353  Vid num: 81, Num of 'bicycle' detected: 3.0, Prompt: @Genarodesigns Prompt: people riding bicycles  Author: @Genarodesigns, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/people_riding_bicycles_seed9428148583954716310.txt\n",
      "2023-08-23 22:43:17 Det num: 85, Positive num: 52, Positive rate: 0.611764705882353  Vid num: 81, Num of 'bicycle' detected: 3.0, Prompt: @Genarodesigns Prompt: people riding bicycles  Author: @Genarodesigns, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/people_riding_bicycles_seed9428148583954716310.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "frame 23 writed\n",
      "./pikavideos/20230823-222352/bicycle/mask_people_riding_bicycles_seed9428148583954716310.mp4 saved\n",
      "./pikavideos/20230823-222352/bicycle/gif_people_riding_bicycles_seed9428148583954716310.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/cake/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 0\n",
      "./pikavideos/20230823-222352/cake/mask_realistic_8k_video_of_cute_16_years_old_boys_and_girls_expressing_friendship_around_a_birthday_cake__seed5690752562088203955.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:43:30 Det num: 86, Positive num: 52, Positive rate: 0.6046511627906976  Vid num: 82, Num of 'cake' detected: 0.0, Prompt: @Naomi76# Prompt: realistic 8k video of cute 16 years old boys and girls expressing friendship around a birthday cake with candles, -neg \"worst resolution, slow-motion, no-movment, ugly face, changing size limbs, limbs apart, morphing limbs\",-motion:4  Author: @Naomi76#, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/realistic_8k_video_of_cute_16_years_old_boys_and_girls_expressing_friendship_around_a_birthday_cake__seed5690752562088203955.txt\n",
      "2023-08-23 22:43:30 Det num: 86, Positive num: 52, Positive rate: 0.6046511627906976  Vid num: 82, Num of 'cake' detected: 0.0, Prompt: @Naomi76# Prompt: realistic 8k video of cute 16 years old boys and girls expressing friendship around a birthday cake with candles, -neg \"worst resolution, slow-motion, no-movment, ugly face, changing size limbs, limbs apart, morphing limbs\",-motion:4  Author: @Naomi76#, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/realistic_8k_video_of_cute_16_years_old_boys_and_girls_expressing_friendship_around_a_birthday_cake__seed5690752562088203955.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/cake/gif_realistic_8k_video_of_cute_16_years_old_boys_and_girls_expressing_friendship_around_a_birthday_cake__seed5690752562088203955.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/cat/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 22 writed 23, obj_num 1\r"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:43:44 Det num: 87, Positive num: 53, Positive rate: 0.6091954022988506  Vid num: 83, Num of 'cat' detected: 1.0, Prompt: @Dagorti Prompt: angry cat is hissing and showing his fangs  Image: 1 Attachment  Author: @Dagorti, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/angry_cat_is_hissing_and_showing_his_fangs__Image__1_Attachment_seed16569916943315044273.txt\n",
      "2023-08-23 22:43:44 Det num: 87, Positive num: 53, Positive rate: 0.6091954022988506  Vid num: 83, Num of 'cat' detected: 1.0, Prompt: @Dagorti Prompt: angry cat is hissing and showing his fangs  Image: 1 Attachment  Author: @Dagorti, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/angry_cat_is_hissing_and_showing_his_fangs__Image__1_Attachment_seed16569916943315044273.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "frame 23 writed\n",
      "./pikavideos/20230823-222352/cat/mask_angry_cat_is_hissing_and_showing_his_fangs__Image__1_Attachment_seed16569916943315044273.mp4 saved\n",
      "./pikavideos/20230823-222352/cat/gif_angry_cat_is_hissing_and_showing_his_fangs__Image__1_Attachment_seed16569916943315044273.gif saved\n",
      "\n",
      "finished\n",
      "Directory created: ./pikavideos/20230823-222352/elephant/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 21 writed 23, obj_num 1\r"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:43:57 Det num: 88, Positive num: 54, Positive rate: 0.6136363636363636  Vid num: 84, Num of 'elephant' detected: 1.0, Prompt: @Medin Prompt: Man on elephant dancing, elephant moving, cinematic scene, and background people moving, 4K -ar 1:1 -motion:2 --neg \"no other creatures\"  Image: 1 Attachment  Author: @Medin, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Man_on_elephant_dancing_elephant_moving_cinematic_scene_and_background_people_moving_4K_-ar_1_1__seed430807081186622407.txt\n",
      "2023-08-23 22:43:57 Det num: 88, Positive num: 54, Positive rate: 0.6136363636363636  Vid num: 84, Num of 'elephant' detected: 1.0, Prompt: @Medin Prompt: Man on elephant dancing, elephant moving, cinematic scene, and background people moving, 4K -ar 1:1 -motion:2 --neg \"no other creatures\"  Image: 1 Attachment  Author: @Medin, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/Man_on_elephant_dancing_elephant_moving_cinematic_scene_and_background_people_moving_4K_-ar_1_1__seed430807081186622407.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "frame 23 writed\n",
      "./pikavideos/20230823-222352/elephant/mask_Man_on_elephant_dancing_elephant_moving_cinematic_scene_and_background_people_moving_4K_-ar_1_1__seed430807081186622407.mp4 saved\n",
      "./pikavideos/20230823-222352/elephant/gif_Man_on_elephant_dancing_elephant_moving_cinematic_scene_and_background_people_moving_4K_-ar_1_1__seed430807081186622407.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/car/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 3\n",
      "./pikavideos/20230823-222352/car/mask_cars_moving__Image__1_Attachment_seed3449892716956505285.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:44:10 Det num: 89, Positive num: 55, Positive rate: 0.6179775280898876  Vid num: 85, Num of 'car' detected: 2.9583333333333335, Prompt: @MajorMills Prompt: cars moving  Image: 1 Attachment  Author: @MajorMills, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/cars_moving__Image__1_Attachment_seed3449892716956505285.txt\n",
      "2023-08-23 22:44:10 Det num: 89, Positive num: 55, Positive rate: 0.6179775280898876  Vid num: 85, Num of 'car' detected: 2.9583333333333335, Prompt: @MajorMills Prompt: cars moving  Image: 1 Attachment  Author: @MajorMills, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/cars_moving__Image__1_Attachment_seed3449892716956505285.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/car/gif_cars_moving__Image__1_Attachment_seed3449892716956505285.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/dog/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/dog/mask_dog_plaaying_with_toy_4K_-ar_1_1__Image__1_Attachment_seed14354397326744048694.mp4 saved\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:44:24 Det num: 90, Positive num: 56, Positive rate: 0.6222222222222222  Vid num: 86, Num of 'dog' detected: 1.0, Prompt: @gerard Prompt: dog plaaying with toy 4K -ar 1:1  Image: 1 Attachment  Author: @gerard, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/dog_plaaying_with_toy_4K_-ar_1_1__Image__1_Attachment_seed14354397326744048694.txt\n",
      "2023-08-23 22:44:24 Det num: 90, Positive num: 56, Positive rate: 0.6222222222222222  Vid num: 86, Num of 'dog' detected: 1.0, Prompt: @gerard Prompt: dog plaaying with toy 4K -ar 1:1  Image: 1 Attachment  Author: @gerard, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/dog_plaaying_with_toy_4K_-ar_1_1__Image__1_Attachment_seed14354397326744048694.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "./pikavideos/20230823-222352/dog/gif_dog_plaaying_with_toy_4K_-ar_1_1__Image__1_Attachment_seed14354397326744048694.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/horse/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 21 writed 23, obj_num 1\r"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:44:40 Det num: 91, Positive num: 57, Positive rate: 0.6263736263736264  Vid num: 87, Num of 'horse' detected: 1.0, Prompt: @Mat Prompt: horse running , gs 5, motion 2  Image: 1 Attachment  Author: @Mat, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/horse_running__gs_5_motion_2__Image__1_Attachment_seed708584625464338882.txt\n",
      "2023-08-23 22:44:40 Det num: 91, Positive num: 57, Positive rate: 0.6263736263736264  Vid num: 87, Num of 'horse' detected: 1.0, Prompt: @Mat Prompt: horse running , gs 5, motion 2  Image: 1 Attachment  Author: @Mat, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/horse_running__gs_5_motion_2__Image__1_Attachment_seed708584625464338882.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "frame 23 writed\n",
      "./pikavideos/20230823-222352/horse/mask_horse_running__gs_5_motion_2__Image__1_Attachment_seed708584625464338882.mp4 saved\n",
      "./pikavideos/20230823-222352/horse/gif_horse_running__gs_5_motion_2__Image__1_Attachment_seed708584625464338882.gif saved\n",
      "\n",
      "finished\n",
      "Directory already exists: ./pikavideos/20230823-222352/person/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "frame 23 writed 23, obj_num 1\n",
      "./pikavideos/20230823-222352/person/mask_person_smiling_and_waving___seed13486674019683534384.mp4 saved\n",
      "./pikavideos/20230823-222352/person/gif_person_smiling_and_waving___seed13486674019683534384.gif saved\n",
      "\n",
      "finished\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2023-08-23 22:44:52 Det num: 92, Positive num: 58, Positive rate: 0.6304347826086957  Vid num: 88, Num of 'person' detected: 1.0, Prompt: @Rhinger Prompt: person smiling and waving   Author: @Rhinger, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/person_smiling_and_waving___seed13486674019683534384.txt\n",
      "2023-08-23 22:44:52 Det num: 92, Positive num: 58, Positive rate: 0.6304347826086957  Vid num: 88, Num of 'person' detected: 1.0, Prompt: @Rhinger Prompt: person smiling and waving   Author: @Rhinger, Path: /apdcephfs_cq3/share_1290939/shadowcun/evals_dev/pikavideos/prompts/person_smiling_and_waving___seed13486674019683534384.txt\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Directory already exists: ./pikavideos/20230823-222352/car/masks\n",
      "final text_encoder_type: bert-base-uncased\n",
      "Model loaded from ./ckpt/groundingdino_swint_ogc.pth \n",
      " => _IncompatibleKeys(missing_keys=[], unexpected_keys=['label_enc.weight', 'bert.embeddings.position_ids'])\n",
      "SegTracker has been initialized\n",
      "processed frame 20, obj_num 2\r"
     ]
    }
   ],
   "source": [
    "import cv2\n",
    "import os\n",
    "import re\n",
    "import logging\n",
    "import time\n",
    "import wandb\n",
    "\n",
    "#### Detection on videos ####\n",
    "# task = 'fulljourney_videos'\n",
    "task = 'pikavideos'\n",
    "# Create the directory if it doesn't exist\n",
    "timestamp = time.strftime(\"%Y%m%d-%H%M%S\")\n",
    "\n",
    "os.makedirs(f\"./{task}/{timestamp}\", exist_ok=True)\n",
    "wandb.init(project=\"Vid Model Eval\",name=str(timestamp)+\"_\"+task)\n",
    "\n",
    "# Set up logging\n",
    "logger = logging.getLogger()\n",
    "logger.setLevel(logging.INFO)\n",
    "\n",
    "# File handler for writing logs to a file\n",
    "file_handler = logging.FileHandler(filename=f\"./{task}/{timestamp}/object_det_record.txt\")\n",
    "file_handler.setFormatter(logging.Formatter(\"%(asctime)s %(message)s\", datefmt=\"%Y-%m-%d %H:%M:%S\"))\n",
    "logger.addHandler(file_handler)\n",
    "\n",
    "# Stream handler for displaying logs in the terminal\n",
    "stream_handler = logging.StreamHandler()\n",
    "stream_handler.setFormatter(logging.Formatter(\"%(asctime)s %(message)s\", datefmt=\"%Y-%m-%d %H:%M:%S\"))\n",
    "logger.addHandler(stream_handler)\n",
    "\n",
    "# settings for detection function\n",
    "# choose good parameters in sam_args based on the first frame segmentation result\n",
    "# other arguments can be modified in model_args.py\n",
    "# note the object number limit is 255 by default, which requires < 10GB GPU memory with amp\n",
    "sam_args['generator_args'] = {\n",
    "        'points_per_side': 30,\n",
    "        'pred_iou_thresh': 0.8,\n",
    "        'stability_score_thresh': 0.9,\n",
    "        'crop_n_layers': 1,\n",
    "        'crop_n_points_downscale_factor': 2,\n",
    "        'min_mask_region_area': 200,\n",
    "    }\n",
    "\n",
    "# For every sam_gap frames, we use SAM to find new objects and add them for tracking\n",
    "# larger sam_gap is faster but may not spot new objects in time\n",
    "segtracker_args = {\n",
    "    'sam_gap': 49, # the interval to run sam to segment new objects\n",
    "    'min_area': 200, # minimal mask area to add a new mask as a new object\n",
    "    'max_obj_num': 255, # maximal object number to track in a video\n",
    "    'min_new_obj_iou': 0.8, # the area of a new object in the background should > 80% \n",
    "}\n",
    "\n",
    "# Set Text args\n",
    "'''\n",
    "parameter:\n",
    "    grounding_caption: Text prompt to detect objects in key-frames\n",
    "    box_threshold: threshold for box \n",
    "    text_threshold: threshold for label(text)\n",
    "    box_size_threshold: If the size ratio between the box and the frame is larger than the box_size_threshold, the box will be ignored. This is used to filter out large boxes.\n",
    "    reset_image: reset the image embeddings for SAM\n",
    "'''\n",
    "# grounding_caption = \"car.suv\"\n",
    "grounding_caption = \"\" #must have this class in the image, otherwise go wrong\n",
    "box_threshold, text_threshold, box_size_threshold, reset_image = 0.6, 0.5, 0.5, True \n",
    "\n",
    "# COCO dataset\n",
    "keywords = ['person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus',\n",
    "                   'train', 'truck', 'boat', 'traffic light', 'fire hydrant',\n",
    "                   'stop sign', 'parking meter', 'bench', 'bird', 'cat', 'dog',\n",
    "                   'horse', 'sheep', 'cow', 'elephant', 'bear', 'zebra', 'giraffe',\n",
    "                   'backpack', 'umbrella', 'handbag', 'tie', 'suitcase', 'frisbee',\n",
    "                   'skis', 'snowboard', 'sports ball', 'kite', 'baseball bat',\n",
    "                   'baseball glove', 'skateboard', 'surfboard', 'tennis racket',\n",
    "                   'bottle', 'wine glass', 'cup', 'fork', 'knife', 'spoon', 'bowl',\n",
    "                   'banana', 'apple', 'sandwich', 'orange', 'broccoli', 'carrot',\n",
    "                   'hot dog', 'pizza', 'donut', 'cake', 'chair', 'couch',\n",
    "                   'potted plant', 'bed', 'dining table', 'toilet', 'tv', 'laptop',\n",
    "                   'mouse', 'remote', 'keyboard', 'cell phone', 'microwave',\n",
    "                   'oven', 'toaster', 'sink', 'refrigerator', 'book', 'clock',\n",
    "                   'vase', 'scissors', 'teddy bear', 'hair drier', 'toothbrush'] #coco classes, https://github.com/matlab-deep-learning/Object-Detection-Using-Pretrained-YOLO-v2/blob/main/+helper/coco-classes.txt\n",
    "    \n",
    "    \n",
    "dir_videos = f'/apdcephfs_cq3/share_1290939/shadowcun/evals_dev/{task}/samples/'\n",
    "dir_prompts = f'/apdcephfs_cq3/share_1290939/shadowcun/evals_dev/{task}/prompts/'\n",
    "\n",
    "prompt_paths = [os.path.join(dir_prompts, x) for x in os.listdir('/apdcephfs_cq3/share_1290939/shadowcun/evals_dev/'+task+'/prompts')]\n",
    "video_paths = [os.path.join(dir_videos, os.path.splitext(os.path.basename(x))[0]+'.mp4') for x in prompt_paths]\n",
    "prompt_paths_object = []\n",
    "video_paths_object = []\n",
    "det_count = []\n",
    "keyword_object = []\n",
    "prompt_object = []\n",
    "det_num = 0\n",
    "object_count = 0\n",
    "pos_num = 0\n",
    "vid_num = 0\n",
    "last_video_name = ' '\n",
    "start_time = time.time()  # Start the timer\n",
    "logger.info(f\"Total video num {len(prompt_paths)}\")\n",
    "wandb.log({\"Total video num\": len(prompt_paths)\n",
    "            })\n",
    "\n",
    "for i in range(len(prompt_paths)):\n",
    "    with open(prompt_paths[i], \"r\") as f:\n",
    "        data = f.read() \n",
    "    for keyword in keywords:\n",
    "        num = len(re.findall(r'\\b' + re.escape(keyword) + r'(s|es)?\\b', data, re.IGNORECASE))      \n",
    "        if num > 0:\n",
    "            video_name = os.path.splitext(os.path.basename(prompt_paths[i]))[0]\n",
    "            if video_name != last_video_name:\n",
    "                vid_num +=1\n",
    "            last_video_name = video_name\n",
    "            io_args = {\n",
    "                'input_video': f'/apdcephfs_cq3/share_1290939/shadowcun/evals_dev/{task}/samples/{video_name}.mp4',\n",
    "                'output_mask_dir': f'./{task}/{timestamp}/{keyword}/masks/{video_name}', # save pred masks\n",
    "                'original_video': f'./{task}/{timestamp}/{keyword}/original_{video_name}.mp4', \n",
    "                'output_video': f'./{task}/{timestamp}/{keyword}/mask_{video_name}.mp4', # mask+frame vizualization, mp4 or avi, else the same as input video\n",
    "                'output_gif': f'./{task}/{timestamp}/{keyword}/gif_{video_name}.gif', # mask visualization\n",
    "            }\n",
    "            path = create_directories(io_args['output_mask_dir'])\n",
    "            \n",
    "            ## detection \n",
    "            grounding_caption = keyword\n",
    "            pred_list, det_count_one = video_detection(io_args, segtracker_args, sam_args, aot_args, grounding_caption, box_threshold, text_threshold, box_size_threshold, reset_image)\n",
    "            det_num += 1 \n",
    "            if det_count_one:\n",
    "                pos_num += 1\n",
    "            det_count.append(det_count_one)\n",
    "            prompt_paths_object.append(prompt_paths[i])\n",
    "            keyword_object.append(keyword)\n",
    "            prompt_object.append(data)\n",
    "            object_metric = pos_num/det_num\n",
    "            logging.info(f\"Det num: {det_num}, Positive num: {pos_num}, Positive rate: {object_metric}  Vid num: {vid_num}, Num of '{keyword}' detected: {det_count_one}, Prompt: {data}, Path index: {i}, Video name: {video_name}\")\n",
    "            wandb.log({\n",
    "                \"Positive rate\": object_metric,\n",
    "                \"Det num\": det_num,\n",
    "                \"Positive num\": pos_num,\n",
    "            })\n",
    "            \n",
    "object_metric = pos_num/det_num\n",
    "# for i in range(len(obj_num)):\n",
    "#     object_count += abs(det_count[i] - obj_num[i])/(et_count[i] + obj_num[i]) \n",
    "# object_count_metric = 1 - (object_count/len(obj_num))  \n",
    "end_time = time.time()  # Stop the timer\n",
    "elapsed_time = end_time - start_time\n",
    "logger.info(f\"Object generation metric: {object_metric:.2f} \")\n",
    "# logger.info(f\"N objects generation metric: {object_count_metric:.2f} \")\n",
    "logger.info(f\"Total processing time: {elapsed_time:.2f} seconds\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "object_metric = pos_num/det_num\n",
    "# for i in range(len(obj_num)):\n",
    "#     object_count += abs(det_count[i] - obj_num[i])/(et_count[i] + obj_num[i]) \n",
    "# object_count_metric = 1 - (object_count/len(obj_num))  \n",
    "# end_time = time.time()  # Stop the timer\n",
    "# elapsed_time = end_time - start_time\n",
    "object_metric"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Set parameters for input and output"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "task = 'fulljourney_videos'\n",
    "# task = 'pikavideos'\n",
    "video_name = \"generated_video_ec706b3b-84c5-4169-b65d-e72efadf754f\"\n",
    "io_args = {\n",
    "    'input_video': f'/apdcephfs_cq3/share_1290939/shadowcun/evals_dev/{task}/samples/{video_name}.mp4',\n",
    "    'output_mask_dir': f'./{task}/masks/{video_name}', # save pred masks\n",
    "    'output_video': f'./{task}/{video_name}.mp4', # mask+frame vizualization, mp4 or avi, else the same as input video\n",
    "    'output_gif': f'./{task}/{video_name}.gif', # mask visualization\n",
    "}\n",
    "path = create_directories(io_args['output_mask_dir'])"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Tuning Grounding-DINO and SAM on the First Frame for Good Initialization"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# choose good parameters in sam_args based on the first frame segmentation result\n",
    "# other arguments can be modified in model_args.py\n",
    "# note the object number limit is 255 by default, which requires < 10GB GPU memory with amp\n",
    "sam_args['generator_args'] = {\n",
    "        'points_per_side': 30,\n",
    "        'pred_iou_thresh': 0.8,\n",
    "        'stability_score_thresh': 0.9,\n",
    "        'crop_n_layers': 1,\n",
    "        'crop_n_points_downscale_factor': 2,\n",
    "        'min_mask_region_area': 200,\n",
    "    }\n",
    "\n",
    "# Set Text args\n",
    "'''\n",
    "parameter:\n",
    "    grounding_caption: Text prompt to detect objects in key-frames\n",
    "    box_threshold: threshold for box \n",
    "    text_threshold: threshold for label(text)\n",
    "    box_size_threshold: If the size ratio between the box and the frame is larger than the box_size_threshold, the box will be ignored. This is used to filter out large boxes.\n",
    "    reset_image: reset the image embeddings for SAM\n",
    "'''\n",
    "# grounding_caption = \"car.suv\"\n",
    "grounding_caption = \"tree\" #must have this class in the image, otherwise go wrong\n",
    "# grounding_caption = \"Obama\" \n",
    "box_threshold, text_threshold, box_size_threshold, reset_image = 0.6, 0.5, 0.5, True \n",
    "\n",
    "cap = cv2.VideoCapture(io_args['input_video'])\n",
    "frame_idx = 0\n",
    "segtracker = SegTracker(segtracker_args,sam_args,aot_args)\n",
    "segtracker.restart_tracker()\n",
    "with torch.cuda.amp.autocast():\n",
    "    while cap.isOpened():\n",
    "        ret, frame = cap.read()\n",
    "        frame = cv2.cvtColor(frame,cv2.COLOR_BGR2RGB)\n",
    "        count, pred_mask, annotated_frame = segtracker.detect_and_seg(frame, grounding_caption, box_threshold, \n",
    "                                                               text_threshold, box_size_threshold) # return a flag, whether detected or not\n",
    "        torch.cuda.empty_cache()\n",
    "        obj_ids = np.unique(pred_mask)\n",
    "        obj_ids = obj_ids[obj_ids!=0]\n",
    "        print(\"processed frame {}, obj_num {}\".format(frame_idx,len(obj_ids)),end='\\n')\n",
    "        break\n",
    "    cap.release()\n",
    "    \n",
    "    init_res = draw_mask(annotated_frame, pred_mask,id_countour=False)\n",
    "    plt.figure(figsize=(10,10))\n",
    "    plt.axis('off')\n",
    "    plt.imshow(init_res)\n",
    "    plt.show()\n",
    "    plt.figure(figsize=(10,10))\n",
    "    plt.axis('off')\n",
    "    plt.imshow(colorize_mask(pred_mask))\n",
    "    plt.show()\n",
    "\n",
    "    del segtracker\n",
    "    torch.cuda.empty_cache()\n",
    "    gc.collect()"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Generate Results for the Whole Video"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# For every sam_gap frames, we use SAM to find new objects and add them for tracking\n",
    "# larger sam_gap is faster but may not spot new objects in time\n",
    "segtracker_args = {\n",
    "    'sam_gap': 49, # the interval to run sam to segment new objects\n",
    "    'min_area': 200, # minimal mask area to add a new mask as a new object\n",
    "    'max_obj_num': 255, # maximal object number to track in a video\n",
    "    'min_new_obj_iou': 0.8, # the area of a new object in the background should > 80% \n",
    "}\n",
    "\n",
    "# source video to segment\n",
    "cap = cv2.VideoCapture(io_args['input_video'])\n",
    "fps = cap.get(cv2.CAP_PROP_FPS)\n",
    "# output masks\n",
    "output_dir = io_args['output_mask_dir']\n",
    "if not os.path.exists(output_dir):\n",
    "    os.makedirs(output_dir)\n",
    "pred_list = []\n",
    "masked_pred_list = []\n",
    "\n",
    "torch.cuda.empty_cache()\n",
    "gc.collect()\n",
    "sam_gap = segtracker_args['sam_gap']\n",
    "frame_idx = 0\n",
    "segtracker = SegTracker(segtracker_args, sam_args, aot_args)\n",
    "segtracker.restart_tracker()\n",
    "\n",
    "with torch.cuda.amp.autocast():\n",
    "    while cap.isOpened():\n",
    "        ret, frame = cap.read()\n",
    "        if not ret:\n",
    "            break\n",
    "        frame = cv2.cvtColor(frame,cv2.COLOR_BGR2RGB)\n",
    "        if frame_idx == 0:\n",
    "            pred_mask, _ = segtracker.detect_and_seg(frame, grounding_caption, box_threshold, text_threshold, box_size_threshold, reset_image)\n",
    "            # pred_mask = cv2.imread('./debug/first_frame_mask.png', 0)\n",
    "            torch. cuda.empty_cache()\n",
    "            gc.collect()\n",
    "            segtracker.add_reference(frame, pred_mask)\n",
    "        elif (frame_idx % sam_gap) == 0:\n",
    "            seg_mask, _ = segtracker.detect_and_seg(frame, grounding_caption, box_threshold, text_threshold, box_size_threshold, reset_image)\n",
    "            save_prediction(seg_mask, './debug/seg_result', str(frame_idx)+'.png')\n",
    "            torch.cuda.empty_cache()\n",
    "            gc.collect()\n",
    "            track_mask = segtracker.track(frame)\n",
    "            save_prediction(track_mask, './debug/aot_result', str(frame_idx)+'.png')\n",
    "            # find new objects, and update tracker with new objects\n",
    "            new_obj_mask = segtracker.find_new_objs(track_mask, seg_mask)\n",
    "            if np.sum(new_obj_mask > 0) >  frame.shape[0] * frame.shape[1] * 0.4:\n",
    "                new_obj_mask = np.zeros_like(new_obj_mask)\n",
    "            save_prediction(new_obj_mask,output_dir,str(frame_idx)+'_new.png')\n",
    "            pred_mask = track_mask + new_obj_mask\n",
    "            # segtracker.restart_tracker()\n",
    "            segtracker.add_reference(frame, pred_mask)\n",
    "        else:\n",
    "            pred_mask = segtracker.track(frame,update_memory=True)\n",
    "        torch.cuda.empty_cache()\n",
    "        gc.collect()\n",
    "        \n",
    "        save_prediction(pred_mask,output_dir,str(frame_idx)+'.png')\n",
    "        # masked_frame = draw_mask(frame,pred_mask)\n",
    "        # masked_pred_list.append(masked_frame)\n",
    "        # plt.imshow(masked_frame)\n",
    "        # plt.show() \n",
    "        \n",
    "        pred_list.append(pred_mask)\n",
    "        print(\"processed frame {}, obj_num {}\".format(frame_idx,segtracker.get_obj_num()),end='\\r')\n",
    "        frame_idx += 1\n",
    "    cap.release()\n",
    "    print('\\nfinished')"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Save results for visualization"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# draw pred mask on frame and save as a video\n",
    "cap = cv2.VideoCapture(io_args['input_video'])\n",
    "fps = cap.get(cv2.CAP_PROP_FPS)\n",
    "width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))\n",
    "height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))\n",
    "num_frames = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))\n",
    "\n",
    "if io_args['input_video'][-3:]=='mp4':\n",
    "    fourcc =  cv2.VideoWriter_fourcc(*\"mp4v\")\n",
    "elif io_args['input_video'][-3:] == 'avi':\n",
    "    fourcc =  cv2.VideoWriter_fourcc(*\"MJPG\")\n",
    "    # fourcc = cv2.VideoWriter_fourcc(*\"XVID\")\n",
    "else:\n",
    "    fourcc = int(cap.get(cv2.CAP_PROP_FOURCC))\n",
    "out = cv2.VideoWriter(io_args['output_video'], fourcc, fps, (width, height))\n",
    "\n",
    "frame_idx = 0\n",
    "while cap.isOpened():\n",
    "    ret, frame = cap.read()\n",
    "    if not ret:\n",
    "        break\n",
    "    frame = cv2.cvtColor(frame,cv2.COLOR_BGR2RGB)\n",
    "    pred_mask = pred_list[frame_idx]\n",
    "    masked_frame = draw_mask(frame,pred_mask)\n",
    "    # masked_frame = masked_pred_list[frame_idx]\n",
    "    masked_frame = cv2.cvtColor(masked_frame,cv2.COLOR_RGB2BGR)\n",
    "    out.write(masked_frame)\n",
    "    print('frame {} writed'.format(frame_idx),end='\\r')\n",
    "    frame_idx += 1\n",
    "out.release()\n",
    "cap.release()\n",
    "print(\"\\n{} saved\".format(io_args['output_video']))\n",
    "print('\\nfinished')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# save colorized masks as a gif\n",
    "duration = 1000 / fps\n",
    "imageio.mimsave(io_args['output_gif'],pred_list,duration=duration)\n",
    "print(\"{} saved\".format(io_args['output_gif']))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# manually release memory (after cuda out of memory)\n",
    "del segtracker\n",
    "torch.cuda.empty_cache()\n",
    "gc.collect()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.17"
  },
  "vscode": {
   "interpreter": {
    "hash": "536611da043600e50719c9460971b5220bad26cd4a87e5994bfd4c9e9e5e7fb0"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
